call_user_func_array
<<<
call_user_func create_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.7 call_user_func() Appelle une fonction utilisateur

[ Exemples avec call_user_func ]   PHP 3>= 3.0.3, PHP 4

mixed  call_user_func ( string   function_name , mixed   parameter , mixed   ... )

call_user_func appelle la fonction utilisateur function_name , et lui passe les paramètres parameter . Par exemple :

<?php
  
function barbier ($type) {
    print
"Vous vouliez une coupe $type, pas de problème";
  }
  
call_user_func('barbier', "iroquois");
  
call_user_func('barbier', "militaire");
  
call_user_func('barbier', "au bol");
?>

Voir aussi call_user_func_array , call_user_method et call_user_method_array .

<< call_user_func >>
call_user_func_array Fonctions create_function