The ward is a factory for the Combine
why all my hosts are running PHP 4?
Collin is puzzled:
So, if PHP is currently at 5.2.4 then why the hell are all my hosts still running 4.4.2 or 4.4.3? Am I using shit hosts or are all hosting companies this slow to respond??
the short answer because PHP sucks, the longer one is really simple as well:
- there are too many well-known PHP4 apps (including those that power control panels of hosting providers themselves) which will be borked on PHP5 without a serious code redone to workaround PHP5 backward incompatible changes.
- it’s too much of a maintenance hassle for web hosts to reliably run both PHP4 and PHP5 on a shared hosting.
the only path PHP.net offers is a "Migrating from PHP 4 to PHP 5" appendix document with quite a few of "User Contributed Notes", but you won’t find any documentation neither provided nor merely approved by the PHP.net on how to reliably run both PHP4 and PHP5 on a same box.
in a year I expect the fun times:
PHP 4 end of life announcement
PHP 4 will be discontinued.
The PHP development team hereby announces that support for PHP 4 will continue until the end of this year only. After 2007-12-31 there will be no more releases of PHP 4.4. We will continue to make critical security fixes available on a case-by-case basis until 2008-08-08.
also, in the comments to the same Collin’s post cited above, Trent links to just an exciting PHP 4/5 speed comparison "test" by Barry of Automattic Inc. who found "php5 was 33 % slower than php4!":
Here are the results of a simple apache bench test of a phpinfo page.
[snip: test results here]
From these preliminary tests, php 5.2.2 seems about 33% slower than php 4.4.6. Surprising…
surprising? not at all, never seen such a meaningless test to measure a PHP performance:
hello, ApacheBench is "a command line computer program for measuring the performance of HTTP web servers, in particular the Apache HTTP Server", not that for measuring the performance of PHP itself.
of course, first of all httpd had to be thrown out of the loop and the performance of PHP should be measured using the CLI.
- let alone phpinfo() outputs different stuff on different versions of PHP, will anyone ever be calling this particular function in a production environment like so many times Barry did in his "test"?
can’t imagine any more pointless test than measuring the speed of phpinfo() by the Apache Benchmark tool "to see if upgrading to php 5 is something we want to do on WordPress.com". admittedly, I haven’t profiled WP but phpinfo() is definitely not something like a WP bottleneck!
(nor I suppose an echo() — hat tip to Matt ;-)