PHP command line syntax checking

~ 0 min
22-09-2012 23:58

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 "{}" \;

 

Average rating 0 (0 Votes)

You cannot comment on this entry

Tags

3Ware