Finding syntax errors in your PHP Project files

Till posted this little snippet;
It’s so useful I just had to share it 🙂

find . \( -name "*.php" -o -name "*.phtml" \) -exec php -l {} \;

Just go to your project directory and fire it off, it will help you find those pesky unmatched {}

One Reply to “Finding syntax errors in your PHP Project files”

Leave a Reply

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