Re: How efficient is OOP in PHP5?

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

 



Thanks for your help!

That is just what I wana hear.

Actually, in most web applications, the real bottle-neck of performance is the Database, but not the PHP scripts-of coz, I don't take obvious mistakes.

So I don't wana write my application without OOP or functions, just for this bit performance improvement. I need a well maintianed product.
Jochem Maas wrote:
TalkativeDoggy wrote:

Hi all,

I have heard that "function style is 400% faster than OOP in PHP", and give a little agreement. So in the past year, I write more PHP code in function way while less in OOP way.

This morning, I read an article called "How efficient is OOP in PHP"
according to the author's test, writing PHP code in procedural way(functions) is 200%+ faster than OOP way.

But this article is written in 2003, now, I am using PHP5, how about the performance of OOP in PHP5? Could any one give me more efficient references?


objects are slower than functions.
functions are slower than straight up code.

OO in php5 is a lot better than in php4 also in terms of speed.
php5.1 brings a new execution model in the zend engine (IIRC),
regardless the change I refer to gives a not to small speed boost
for OO stuff.

bottom line - its fast enough, and if you need more speed maybe you
need to write a custom extension :-)


Any suggestion or help will be greatly appreciated.

Qin Jianxiang


--
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