Re: Structured Code vs. Performance
| From: | Paul Scott | Date: | Thu, 29 Nov 2007 13:01:14 +0000 |
| Subject: | Re: Structured Code vs. Performance | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265217@lists.php.net to get a copy of this message | ||
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