Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4635 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39468 invoked by uid 1010); 1 Oct 2003 09:31:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39427 invoked from network); 1 Oct 2003 09:31:29 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 1 Oct 2003 09:31:29 -0000 Received: from jdi.jdimedia.nl (jdi.jdimedia.nl [212.204.192.51]) by jdi.jdimedia.nl (8.12.4/8.12.4) with ESMTP id h919UX3t024303; Wed, 1 Oct 2003 11:30:33 +0200 Date: Wed, 1 Oct 2003 11:30:33 +0200 (CEST) X-X-Sender: derick@jdi.jdimedia.nl To: Dennis Sterzenbach cc: ML PHP Internals In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] retrieving information about state of a function From: derick@php.net (Derick Rethans) 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/ -------------------------------------------------------------------------