This will run over every single PHP file on the site and check it for syntax errors using the current version of PHP:

	
find -L /srv/htdocs -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l

Useful for testing PHP upgrades.

h/t Tony Hegyes


One response to “This will run over every single PHP file …”

Leave a Reply

Your email address will not be published. Required fields are marked *