Re: Silly question - include vs. eval
| From: | Robert Cummings | Date: | Wed, 11 Mar 2009 12:46:26 +0000 |
| Subject: | Re: Silly question - include vs. eval | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289840@lists.php.net to get a copy of this message | ||
On Wed, 2009-03-11 at 08:33 -0400, Robert Cummings wrote:
> On Wed, 2009-03-11 at 13:07 +0100, Sándor Tamás (HostWare Kft.) wrote:
> > Hi,
> >
> > I wondering what is the difference between include(), and eval('
> > ?>'.file_get_content().' <?php ')?
> >
> > If there is something I should be aware, please, let me know.
>
> Use include since it allows a cache like eAccelerator or APC to work.
> Eval never gets cached. Also, include let's the engine do the opening,
Before someone mentions it... yes I know there shouldn't be an
apostrophe in the above "let's"... sometimes my fingers make executive
decisions all by themselves :)
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP