Re: retrieving information about state of a function
| From: | Derick Rethans | Date: | Wed, 01 Oct 2003 09:30:33 +0000 |
| Subject: | Re: retrieving information about state of a function | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4635@lists.php.net to get a copy of this message | ||
On Wed, 1 Oct 2003, Dennis Sterzenbach wrote:
> 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.
You can either use function_exists() to check if a function is
available, or use "ini_get('disabled_functions')".
Derick
--
"Interpreting what the GPL actually means is a job best left to those
that read the future by examining animal entrails."
-------------------------------------------------------------------------
Derick Rethans http://derickrethans.nl/
International PHP Magazine http://php-mag.net/
-------------------------------------------------------------------------