Quickly Check every PHP file in your project for errors
December 16, 2008 – 12:28 pmHere’s a quickie – make sure every PHP file in your project parses correctly.
find . -name ‘*.php’ -exec php -l {} \; | grep “Errors parsing”
Tech Thoughts, Mostly on LAMP – by Jon Haddad
Here’s a quickie – make sure every PHP file in your project parses correctly.
find . -name ‘*.php’ -exec php -l {} \; | grep “Errors parsing”
One Response to “Quickly Check every PHP file in your project for errors”
If you really want to terrify yourself, you can also script the Zend Code Analyzer (from the Zend IDE) to run through your entire project and dump to file.
You can invoke it from the command line – wrap it in a script to trawl your entire site, and weep at the results.
By Matt on Dec 22, 2008