Updated : Nov 29, 2017 in Apache

Verifying PHP syntax.

After an upgrade from php 5.6 to 7.0/7.1 many php scripts gave me trouble. So I looked for a way to test the php syntax before errors showed up later when the sites are live. I found this one which is quite helpful:
find . -name "*.php" -exec php -l {} \; 1>/dev/null

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: