PHP 4 End Of Life

PHP Logo

PHP 4 will finally reached its end of life on December 31, 2007. However critical security fixes will be made available until August 8, 2008.

This is a good time to revise your codes, to see whether they will run without any glitches in PHP 5. That first, then when doing any code upgrades or improvements do consider PHP 5 features and functions for your code. This page lists all changes that are not backward compatible in PHP 5.

As you can see, your code styling and implementation greatly effects the outcome of your code. For example the function array_merge in PHP 4 is loose and accepts any variable to be merged into an array, but in PHP 5 if the supplied variable is not an array PHP will throw you a warning (E_WARNING). It is strict. If you have always made sure that your code is strict, that is to always provide an array to be merged, then you can sit back and relax.

That is one example of a changed function, and there are some additions to the available functions as well. Be very careful to observe the changes to object handling in PHP 5.

If you are managing a server, do consider installing PHP 5 as a side, and test your existing systems thoroughly. If you use managed hosting, consider pushing your server provider to install PHP 5 for the same reason. Also make sure that if your provider wants to totally migrate to PHP 5 you are well informed. However, from my tests most of the systems that were developed in the PHP 4 era can still function well in PHP 5… but it is better to be safe than sorry.

0 Shares