Re: How PHP handles multiple inclusions of the same file?
| From: | Curt Zirzow | Date: | Mon, 09 Aug 2004 20:24:26 +0000 |
| Subject: | Re: How PHP handles multiple inclusions of the same file? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-193223@lists.php.net to get a copy of this message | ||
* Thus wrote John W. Holmes:
> From: "Justin Patrin" <papercrane@gmail.com>
> > > eval($script);
> > > use_cached_code();
> >
> > Ick! eval() is evil!
>
> You have benchmarks to back that up or experience?
>
> I did a benchmark between using include(), eval(), smarty, pattemplate, and
> a few others and include() and eval() are always the fastest.
you should add the create_function, aproach i used, in that
benchmark; I've never tested it but i think it'll probably beat
both in a tight looping situation :)
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!