Re: PHP include security

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

 



Hi Michiel!

> One thing to keep in mind is that this one doesn't take eval() vs regular
> include execution time into account, in case you were still considering
> using it. According to this page, it's many times

I was still considering it... I mean, I am still exploring all my
options for the sake of the learning/coding experience.

> slower: http://blog.joshuaeichorn.com/archives/2005/08/01/using-eval-in-php/

Oh! Nice!

[[

The speed of eval
Besides security concerns eval also has the problem of being
incredibly slow. In my testing on PHP 4.3.10 its 10 times slower then
normal code and 28 times slower on PHP 5.1 beta1. This means if you
have to use eval, you should avoid using it inline in any performance
sensitive code. Any easy way to cancel the performance penality is to
create a function in eval and just call that, now an extra function
call does have some performance overhead but its pretty small and
depending on the design can be non-existant since you would be calling
some function anyway.

]]

Interesting. Great read. Thanks for linkage.

[ot] The article also mentions variable functions... I have never used
those before. They look very useful, esp. for a function callback.
Learn something new every day! :) [/ot]

Thanks again for you help Michiel! I really appreciate it. :)

Have a great day!

Cheers,
Micky

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