Why not take a look at the PHP docs:
http://www.php.net/manual/en/migration5.php
http://www.php.net/manual/en/faq.migration5.php
http://www.php.net/manual/en/migration5.incompatible.php
With regards to MySQL you can track changes in versions here:
http://dev.mysql.com/doc/mysqld-version-reference/en/key-changes.html
Major new features added to MySQL 5.0 and 5.1 that may not work/won't work in 4.x can be located here:
MySQL 5.0 - http://dev.mysql.com/doc/refman/5.0/en/mysql-nutshell.html
MySQL 5.1 - http://dev.mysql.com/doc/refman/5.1/en/mysql-nutshell.html