|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-02-17 23:58 UTC] requinix@php.net
-Status: Open
+Status: Wont fix
[2014-02-17 23:58 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 20:00:01 2025 UTC |
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()`.