call_user_func
(PHP3 >= 3.0.3 , PHP4)
call_user_func --- 依照參數呼叫使用者函式
語法 :
mixed call_user_func(string function_name [, mixed parameter [, mixed ...]])說明 :
依照給予的第一個參數function_name來呼叫使用者定義的函式
Example :
<?php
function barber ($type) {
print "You wanted a $type haircut, no problem";
}
call_user_func ('barber', "mushroom");
call_user_func ('barber', "shave");
?>