Req #66729 [NEW]: Introduce a means to test if a function has been disabled via disable_functions
| From: | johnbillion+php at gmail dot com | Date: | Mon, 17 Feb 2014 21:23:24 +0000 |
| Subject: | Req #66729 [NEW]: Introduce a means to test if a function has been disabled via disable_functions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-184338@lists.php.net to get a copy of this message | ||
From: johnbillion+php at gmail dot com
Operating system:
PHP version: Irrelevant
Package: *Configuration Issues
Bug Type: Feature/Change Request
Bug description:Introduce a means to test if a function has been disabled via disable_functions
Description:
------------
Feature request.
It is possible to disable PHP functions via the
disable_functions
directive in php.ini. However, there is no method of testing, at
runtime, whether a given function has been disabled by this means,
The common way to detect whether a function has been disabled is to
inspect the return value of ini_get('disable_functions'). This is far
from optimal, especially if ini_get() itself has been disabled.
A function should be introduced which accepts a function name and
returns a boolean value stating whether the function has been disabled.
Example:
if ( ! function_disabled('exec') ) { exec( $command ) }
Alternatively, to avoid the double negative, it could be named something
like function_enabled() or function_available().
--
Edit bug report at https://bugs.php.net/bug.php?id=66729&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66729&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66729&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66729&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66729&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66729&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66729&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66729&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66729&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66729&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66729&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66729&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66729&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66729&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66729&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66729&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66729&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66729&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66729&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66729&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66729&r=mysqlcfg