function_exists
Description
Return true if the given function has been defined
Syntax
function_exists(string $function): bool
Parameters
function
The function name, as a string.
Return
Returns true if function exists and is a function, false otherwise.
Note: This function will return false for constructs, such as include_once and echo.
Examples
1
<? function myfunction() { } $function = "myfunction"; $return = function_exists($function); var_export($return); ?>
true