How to get all the pre-defined functions list in PHP?

pre defined-php-functions-list

Likely the same way, PHP has a function list that can uncover the mystery of the list of methods which returns various useful results and works like a magic.
Here is another function available in PHP which can provide the list of the defined functions list in an array format.

get_defined_functions();

It returns an array of all defined functions.

get_defined_functions(bool $exclude_disabled = true): array

For more details, you can visit here.
The output of  this function with boolean false will look like something similar to:

Array
(
    [internal] => Array
        (
            [0] => zend_version
            [1] => func_num_args
            [2] => func_get_arg
            [3] => func_get_args
            [4] => strlen
            [5] => strcmp
            [6] => strncmp
            ...
            [750] => bcscale
            [751] => bccomp
        )

    [user] => Array
        (
            [0] => myrow
        )

)

By the mean of $exclude_disabled boolean in this function:

exclude_disabled

Whether disabled functions should be excluded from the return value.
To get more knowledge about PHP topics in detail, please check this link here.

Please follow and like us:

Related Posts

Leave a Reply

Share