A lint check across your code could help
find /source/directory \ 
-name *.php -o -name *.inc -o *.html \ 
| xargs -n1 \ 
php -ddisplay_errors=1 -derror_reporting=8191 -l


Resources

http://php.net/migration5

http://www.php.net/UPDATE_5_2.txt