Re: PHP4 vs PHP5 Performance?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, August 24, 2007 10:11 am, Steve Brown wrote:

> <html>
> <head>
>   <title>PHP Web Server Test</title>
> </head>
> <body>
> <?php phpinfo(); ?>
> </body>
> </html>

phpinfo(), which should never be called in a production setting, is
quite possibly the worst benchmark function you could choose. :-) :-)
:-)

> I ran ab in a loop 12 times with 10,000 connections and a concurrency
> of 10. Then I threw out the highest result and the lowest result and
> averaged the remaining values.   Both PHP4 (v 4.4.7) and PHP5 (v
> 5.2.3) were built as Apache modules, and I simply changed Apache's
> config file to swap modules.
>
> The results were somewhat surprising to me: on average, PHP4
> significantly outperformed PHP5. Over our LAN PHP5 handled roughly
> 1,200 requests / sec while PHP4 handled over 1,800 requests / sec.
> Since everything I have heard/read is that PHP5 is much faster than
> PHP4, I expected the opposite to be true, but the numbers are what
> they are.  Also PHP on Apache1 was much faster than on Apache2.
>
> The only difference I can figure is that PHP5 was the packaged version
> that comes with Ubuntu and I had to compile PHP4 from source since
> there is no package for it in Feisty. But I wouldn't expect a 50%
> increase as a result of that.  Any thoughts on this?

Which PHP on Apache1 vs Apache2 did you try?

PHP5 is probably "faster" for OOP code more than anything, as that's
where most of the development work went.

Well, that and some good XML processing.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux