PHP command line syntax checking

If you have the command line php tool installed (aptitude install php5-cli) then you can just run this command, to check if the syntax is correct:

php -l info.php

 
This is a little helpful, but this is even more: recursively search for php files and check their syntax:

find . -name \*.php -exec php -l "{}" \;

 

You cannot comment on this entry