On Sat, 12 May 2001, Mitch Vincent wrote:

We too have been developing using an OO approach for awhile - definitely
in PHP4.  One of the other guys here was more OO than I was in PHP3, but
we've standardized more on our coding style in PHP4.

I would not doubt that there's some overhead with an OO approach.  Enough
to make a significant slow down?  We run a moderately high volume site -
the code base is pretty OO when it's called for, and we've not noticed any
significant speed issue.  Something going from 20ms to 40ms or 50ms might
be a 100% or greater speed decrease, but it's still pretty darn small.  

If the OO approach lets you code significantly faster than you would
otherwise be able to, continue to do so.  If speed is an ultimate factor,
and you don't use OO in PHP, don't start.  (Code in assembly or C if speed
is a necessity.)

The real-world small penalty you may pay in OO execution time might more
than be overcome by getting a project done days or weeks quicker than you
would otherwise have been able to.  

> 
> I've been coding in PHP for years now and have almost always written
> software in the same general way..My code is *totally* object oriented. I
> have individual classes for individual modules(parts of the application) --
> everything is in a class.. I've never really noticed a problem with PHP's
> execution speed but then I write applications in PHP, not just dynamic web
> sites so the things I write rarely get a whole lot of traffic (most apps are
> intranet apps and are not available to everyone on the net)..
> 
> So... Is this a bad way of doing things in PHP? Exactly what is
> "significant" slow down that Mr. Hughes talks about and does anyone have any
> real-world examples that might back up what he says? I am in the process of
> writing some benchmarks but would still be interested in any and all other
> data from other sources...
> 
> Thanks!!
> 
> -Mitch


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to