Quickly Check every PHP file in your project for errors

December 16, 2008 – 12:28 pm

Here’s a quickie – make sure every PHP file in your project parses correctly.

find . -name ‘*.php’ -exec php -l {} \; | grep “Errors parsing”

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  1. One Response to “Quickly Check every PHP file in your project for errors”

  2. 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

Post a Comment