PHP Syntax Check

Ever had to make a change to a PHP file on the fly only to discover you made a syntax error? There’s an easy way to make sure you don’t have any syntax errors in your changes: run php -l on the file through the command line:

$ php -l yourfile.php

Any syntax errors are reported on the screen.

If all is well, you’ll get this message:
No syntax errors detected in yourfile.php