Search This Blog

Thursday, February 24, 2011

Quick Command - To find php files with Syntax Error

If you have hundreds & thousands of php file and if you have to find a file which syntax error then it is a nightmare.

Here is a ultra simple + quick command to find list of php file(s) which have syntax error

find ./ -name *.php -type f -exec php -l {} \; | grep -v "No syntax errors detected"

No comments:

Post a Comment