Last active
December 19, 2015 10:19
-
-
Save jqlblue/5939201 to your computer and use it in GitHub Desktop.
check php compatibility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#use /usr/sh /path/script.sh > report.txt | |
SOURCE_ROOT='/source/code/directory' | |
PHP_BIN='/usr/bin/php5.5' | |
for file in $(find ${SOURCE_ROOT} -type f -iname '*.php'); do | |
check_syntax=$(${PHP_BIN} -d error_reporting=E_ALL -l $file | grep -v 'No syntax errors detected') | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment