function_exists
<<<
get_defined_functions register_shutdown_function
>>>

6.34 Fonctions
6 Index des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Configuration à l'exécution
Constantes Prédefinies
call_user_func_array
call_user_func
create_function
func_get_arg
func_get_args
func_num_args
function_exists
->get_defined_functions
register_shutdown_function
register_tick_function
unregister_tick_function

6.34.13 get_defined_functions() Liste toutes les fonctions définies

[ Exemples avec get_defined_functions ]   PHP 4 >= 4.0.4

array  get_defined_functions ( void   )

get_defined_functions retourne un tableau multi- dimensionnel, contenant la liste de toutes les fonctions définies, aussi bien les fonctions internes à PHP que celle déjà définie par l'utilisateur. Les noms des fonctions internes sont accessibles via $arr["internal"] , et les fonctions utilisateur sont accessibles via $arr["user"] .

<?php
  
function maligne($id, $data) {
    return
"<tr><th>$id</th><td>$data</td></tr>\n";
  }
  
$arr = get_defined_functions();
  
print_r($arr);
?>

Ce script va afficher :

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] => maligne
        )
)

Voir aussi get_defined_vars .

<< get_defined_functions >>
function_exists Fonctions register_shutdown_function