Debugging php scripts with php-cli
Yet one can use
ini_set("display_errors", 1); in php scripts to turn on error reporting (which might sometimes output a blank, dont-know-what-goes-wrong web page due to some simple syntax errors), there’s another quick and simple way to find all the syntax errors before even run it for the first time, and that is php command line (assuming that the php CLI is installed):
php -l script_name.php
What it does is checking for any syntax erros in the file script_name.php. I use this technique quite often to examine php scripts before I copy them to the web server.