Sommaire

Fonctions

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.2 call_user_func

PHP 3>= 3.0.3, PHP 4 >= 4.0.0

Description

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&egrave;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.