php function_exists("eval") fails
by dogpatch from LinuxQuestions.org on (#4WQD2)
If i call function_exists("eval") on my server, it returns false. But the function eval() exists and works fine.
This is mostly a curiosity question: Please don't lecture me on how i shouldn't use eval() because it's potentially dangerous. If my hosting service were to disable eval(), i could work around that, but would like to know how to tell if this function is avalable.
I can call get_defined_functions() and get a list about a mile long which does indeed include eval() along with other potentially 'dangerous' php functions.
If i call ini_get('disable_functions'), i get an empty list.
Other functions, for example function_exists("exec") returns true. Why does function_exists("eval") return false?


This is mostly a curiosity question: Please don't lecture me on how i shouldn't use eval() because it's potentially dangerous. If my hosting service were to disable eval(), i could work around that, but would like to know how to tell if this function is avalable.
I can call get_defined_functions() and get a list about a mile long which does indeed include eval() along with other potentially 'dangerous' php functions.
If i call ini_get('disable_functions'), i get an empty list.
Other functions, for example function_exists("exec") returns true. Why does function_exists("eval") return false?