Re: Structured Code vs. Performance

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

 



On Thu, 2007-11-29 at 13:51 +0100, Jochem Maas wrote:
> okay, but I was just paraphrasing the man Rasmus, although I admit I
> may
> have misinterpreted (or misundersstood the 'why') - thought I pretty
> sure
> he has written on a number of occasions that code like the following
> sucks
> for op-code caches and should be avoided:
> 
> if (foo()) {
> 	class Foo { }
> }
> 

As I have always understood it, the heavyness only really comes in when
there are conditional includes or requires

if (foo()) {
    require_once('foo_class_inc.php');
}
else {
    // ...
}

--Paul

All Email originating from UWC is covered by disclaimer 
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm 

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