Rapide Advanced Adulte
 
 Web|Image|Shop|Video|News|Wmx|Mobile|Wiki|Ajouter ce moteur

     Manuel PHP     
Partager
 
 
Partager
Partager

 

Table :

.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
 
   

  get_defined_functions  


get_defined_functions

(PHP 4 >= 4.0.4, PHP 5)

get_defined_functions --  Liste toutes les fonctions définies

Description

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"].

Exemple 1. Exemple avec get_defined_functions()

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

$arr = get_defined_functions();

print_r($arr);
?>

L'exemple ci-dessus 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 function_exists(), get_defined_vars() et get_defined_constants().


    Annonces       
 

 Retour au chapitre Php

 

Top
 

Ajouter JungleKey.fr à votre Explorateur

 
 

About Us | © 2007 JungleKey




iBlack | Mobile | Wiki | Ajouter ce moteur
.