Article 4WQD2 php function_exists("eval") fails

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?latest?d=yIl2AUoC8zA latest?i=u2kGXjKufKM:b6yRsUMrx1Q:F7zBnMy latest?i=u2kGXjKufKM:b6yRsUMrx1Q:V_sGLiP latest?d=qj6IDK7rITs latest?i=u2kGXjKufKM:b6yRsUMrx1Q:gIN9vFwu2kGXjKufKM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments