retrieving information about state of a function

From: Date: Wed, 01 Oct 2003 09:26:26 +0000
Subject: retrieving information about state of a function
Groups: php.internals 
Request: Send a blank email to internals+get-4634@lists.php.net to get a copy of this message
Hi, I recognized there isn't any built-in function which tells the disabled/enabled state of some function. I think of something like: if (function_enabled("shell_exec")) { $info = shell_exec("dig myname.com"); } telling if shell_exec is disabled by php.ini setting or not. I already implemented a check which uses an ini_get() to retrieve the list of disabled functions, but I think it would be more smooth having a function provided by PHP for that purpose, because there are functions for all the other kinds of checks: included files, declared classes, defined constants/variables, defined functions, etc. Why not having a function which gives information about disabled/enabled state of a function? I think if the function was provided by PHP makes it faster. -Think of having to explode() and in_array() check for the function. The PHP engine could simply have the list of disabled functions to hand a true/false directly from C code. Which seems to be the more consequent and ideal solution. -- Dennis Sterzenbach www.darknoise.de

« previous php.internals (#4634) next »