Re: Silly question - include vs. eval

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

 



>> 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,
> reading, closing of the file while also parsing and running the contents
> in one fell function call (yes I know it's not a function). What you
> have above, using eval, is a bastardization of cleanliness and
> succinctness of code.
>
> Cheers,
> Rob.

hi,

eval is useful when your php code is stored in database.
read here http://www.php.net/manual/en/function.eval.php for details.

Virgil
http://www.jampmark.com
Free tips, tutorials, innovative tools and techniques for building and
improving web sites

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