PHP - get_defined_functions()
The get_defined_functions() function can return an array of all defined functions.
Syntax
array get_defined_functions([ bool $exclude_disabled = FALSE ] )
The get_defined_functions() function can return multi-dimensional array containing a list of all defined functions, both built-in (internal) and user-defined. The internal functions can be accessible via $arr["internal"], and the user defined ones using $arr["user"].
Example
<?php
function sample_test_func() {
return;
}
$array = get_defined_functions();
print_r($array);
?>
Output
Array
(
[internal] => Array
(
[0] => zend_version
[1] => func_num_args
[2] => func_get_arg
[3] => func_get_args
[4] => strlen
[5] => strcmp
[6] => strncmp
...
...
)
[user] => Array
(
[0] => sample_test_func
)
)
php_function_reference.htm
Advertisements