As everybody in the php world is bound to know, PHP4 is still the dominant platform on the net, despite its age and many shortcomings. Notwhistanding many improvements in speed, security and functionality, PHP 5 has seen so far a less-than-stellar adoption rate.
There have been a lot of discussions in the blogosphere about this “problem”, with the most basic explanation being:
- web hosters do not upgrade because some very successful web apps (blogs, cms, bulletins, etc…) still need php 4 to run
- php coders have to code for php 4 because otherwise they loose the opportunity of getting deployed on shared hosting
- since the apps run on php 4 anyway, why upgrade? (a classic case of dog-eats-tail)
Other people refer to PHP as victim-of-its-own-success: PHP 4 was good enough for everybody, so a lot of people do not feel compelled to upgrade.
While I am generally in favour of extreme ABInex and API stability (I have servers running php 4.0.4, pl1 mind you…), I have to admit that the current situation imposes a heavy burden on the developers of php libraries and applications: the coder has to cater to the quirks and bugs of every possible php version, and either avoid any enhancement that has seen the light roughly in the last 5 years (since the release of php 4.2) or resort to provide alternative code paths for the less-fortunate (the php-compat package on Pear is a great help if you’re into defensive coding).
The best proposal I have seen so far to this situation comes from the Drupal mailing list:
PICK A DATE FOR PHP 4 DESUPPORT AND ANNOUNCE IT TO THE WORLD WITH ENOUGH ADVANCE.
The chosen date has to be agreed upon by most major php application teams (this is the hard part), but most of them, have been planning the upgrade to php5 anyway.
- The hosters and sysadmins at private companies will be given enough time to test the deployment of the new php version
- The developers will feel the need to make sure that their app runs fine on php 5 before the cutover date
- Everybody will be happy (except Stefan Esser, he never is…)
One last question remains open: WHAT SHALL WE CALL THE DAY THAT PHP4 IS PUT TO REST?
Suggestions are welcome…