PHP 4 or PHP 5? Which is Right for me?

Some people ask me whether they should use PHP 4 or PHP 5. I always recommend PHP 5. I do this because I am big in keeping up to date. I usually update my servers at least once a week, more if I get the time. PHP 4 is not going to be patched, under any circumstances, by the makers of PHP after 2008-08-08. They announced this when they released PHP 4.4.8, the latest version of PHP 4 at the time of this writing. I do not just update the services I run on my computers; I update the libraries and the kernel as well. This is what our Kernel and OS updates handle, just the kernel and the other packages on your system that may only be locally accessible. I also make a personal note to not use any operating systems that have reached EOL (End Of Life). It also helps me with troubleshooting other issues that may arise, such as installation of an application.

If you decide to use PHP 4, you should work towards converting everything to be PHP 5 compliant. This will ensure that your application is secure and stable for years to come. Updating your scripts is equally important as it can allow an attacker to compromise your system. From there, they can take any sensitive information on your server or use it to attack other servers. This could lead to downtime on your site. You may have to completely take it down to resolve the security problems. There could also be other stability problems with your site. PHP 4 could have memory leaks and remote DOS vulnerabilities. Both of these situations can lead to downtime for your site.

My personal advice is to stay on top of the software you use. This usually just means subscribing to their mailing lists. This keeps you in the loop as far as new versions or security issues. If you update regularly you can prevent major problems from occurring. And on a final note, when you migrate to a new server, it is always wise to use that as an excuse to run newer versions of everything. It gives you a period of time where you can test your application and ensure it will run for years to come!