views:

338

answers:

2

Has anybody forked PHP4 to continue support for this version?

EDIT: This isn't a question about migrating to PHP5.

+11  A: 

As far as I know - no. PHP5 is pretty good with backwards compatibility and you should not run PHP4 on any publicly facing webserver if security is even a little bit important to you.

I would estimate that PHP5 is 99% backwards compatible. Here is a blog post with typical (small) issues you might run into, usually the way that functions behave in corner cases. Two other resources you might want to look at are Migrating from PHP 4 to PHP 5 in the PHP manual and the PHP5 Migration Appendix, particularly the backwards incompatible changes.

To sum it up: you will need to test in a detailed manner after migration. Most of the things will work, but some might fail in corner cases. Some things can be fixed by tweaking the php.ini, some need a few changes. In general, applications written for PHP4 are less secure than those written for PHP5, because some security features didn't exist or were not widely used. So something like mod_security or PHPIDS (or both) should also be considered.

Cd-MaN
"pretty good" isn't enough. It costs a lot of time and money to port anything old and crusty. And security is one of the reasons I ask.
stesch
If you describe your app as "old and crusty," then perhaps it's time to start updating it.
Jonathan Sampson
If it's not easy to port then it's probably incredibly badly written in the first place. I've never had to spend more than a couple of minutes php5'ing stuff.
Meep3D
Sure it's badly written. It's old PHP code. And it's not just 1 single app.
stesch
+3  A: 

There have been no known forks of PHP4 to continue its support.

PHP4's code is pretty large, and with all its extensions it would be a pretty large project to support as a legacy application.

Ólafur Waage