Upgrading PHP 5.3 to 5.4 - Checking your code (Linux)

If you are upgrading PHP from 5.3 to 5.4 for an existing application, you can use the following commands to check for parse errors.

tree -fi application | grep -E '.php|.phtml' | sed "s/^/php -l /" > files
source files > results

The output is really what comes out of stderr, which will be the parse errors.

Be sure to check out the short_open_tag directive (http://www.php.net/manual/en/ini.core.php#ini.short-open-tag).

By default <?= is enabled, to use <? for statements other than echo, you must enable the short_open_tag option in /etc/php.ini.