Left on the Web

PHP5 adoption

Ilia wonders why people are not using PHP5. A good question, which I even asked of the Joomla! developers a while ago. The answer from Joomla! was predictable and logical: Hosting providers have not adopted PHP5 enough to warrant the switch as of now. Joomla! 2.0 will probably be PHP5. Why should we switch?

Ilia wonders why people are not using PHP5. A good question, which I even asked of the Joomla! developers a while ago. The answer from Joomla! was predictable and logical: Hosting providers have not adopted PHP5 enough to warrant the switch as of now. Joomla! 2.0 will probably be PHP5, but not earlier. According to Nexen, only just over 12% of all PHP installations are PHP5. For a PHP version that has been available for over two years already, that is a very bad score. And I truely don't understand why. Some of the reasons I've heard are: * Hosting provider does not want to upgrade because it breaks compatibility with PHP3 applications client is using * PHP4 is stable, why change a winning team? * Upgrade contains risk That first reason is scary already, and I've really heard that one, though that was about a year ago. Someone still running on PHP3 really doesn't want to do anything good I guess. The second reason is the one I can accept, even though there are tons of reasons to go to PHP5. For hosting providers who don't do development, I can perfectly accept this reason. As long as PHP4 is supported and new versions of that come out, there is no need to make the move. The last reason is stupid. There is little risk in upgrading, especially with the good documentation all around the Internet on upgrading. For development companies however, there is no excuse anymore. Especially, as Ilia mentions, since PHP 5.2 is more performant as any previous PHP version. That, combined with all the new options in PHP5, such as SimpleXML, the new object model, and you name it, there is no reason to stick to PHP4. With PHP5, PHP made a truely big step from a scripting language towards a real programming language, and now it's time for developers to do the same. I am trying to contribute to this by trying to get my current employer to do all future development in PHP5. Since we do a lot of hosting of our clients ourselves, this should not be too much of a problem. Since the new Joomla! 1.5 is written with at least forwards compatibility in mind, hopefully we should not have too much trouble with this approach.
Add comment

Comments

gravatar Vinu Thomas: In most cases, developers have a huge inertia when their code has to be migrated to a new version. Too lazy to test all the old code over again on the new version I guess :)


gravatar left: Vinu: If only that were the only problem. I mean, I have a few sites running on php4, and for now I’m not migrating them. But also in the development of new applications, PHP5 adoption is still not up to speed, and that is a shame because it really is much better than previous versions.


gravatar damien seguy: Hi

New stats are up for december : PHP 5 is about 40% of new installation.

Here are the URL.
PHP stats evolution for December 2006
http://www.nexen.net/chiffres_cles/phpversion/php_stats_evolution_for_december_2006.php
PHP statistics for December 2006
http://www.nexen.net/chiffres_cles/phpversion/php_statistics_for_december_2006.php


gravatar Mike: Two years ago I decided to develop a website in PHP5… what a mistake! My opinion as a programmer is that PHP5 is better than PHP4.

However, the choice of decent value for money hosting companies supporting PHP5 is poor. When a hosting company turns out to be unreliable, moving to another host is a pain, as there aren’t many PHP5 hosts (note I need UK IP in this case).

My solution after two years? Yes I’m afraid I’m about to port all my code from PHP5 to PHP4, not by choice but by necessity as the hosting company I want give unique IP addresses for each website but at a great price – I already know a friend who has been highly successful with this.

On the up side I have managed to implement some code which mimics the autload feature from PHP5 in PHP4. I have also managed to get namespaces working.

And I’ve already tested a site which works on both PHP4 and PHP5 hosts, and will be easy to upgrade to a pure PHP5.

So some good news has come out of this. It means that I have namespaces and autoload working in PHP4.

PHP6… what a joke! Why bother, if PHP5 hasn’t been adopted for over 2 years then what hope has it got. The PHP authors are living in a fantasy dream world, but at least by 2015 we might be using PHP5 ;o)

And maybe PHP6 in 2025, by which time the internet will be completely different, so what’s the point!


© 2004 - 2008 Stefan Koopmanschap + Powered by Symfony, photos powered by Flickr, links powered by Ma.gnolia, Shanghai smilies by Iconbuffet. Feeds: rss / atom. Left on the Web v4.2.3