Disable Functions¶
The disable_functions PHP directive prevents specific functions from being called in PHP scripts. It helps mitigate potential security vulnerabilities or enforce practices by forbidding usage of specific functions, even when they are compiled into the engine.
This directive requires a list of PHP functions, separated by a comma, and set in the PHP.ini file: this is read at startup time and cannot be changed later.
disable_functions only works on PHP native functions, and extension functions. It is not possible to preemptively disable a custom function: this may be achieved by defining the forbidden function, and assigning it a warning, or no operation.
Disabled functions appear as undefined: in fact, they can also be redefined, with a custom code and then used.
See also Disabling functions using the PHP disable_functions directive.
Related : Functions, Preappend File Directive, Disable, Enable, Disable Classes