call_user_func

(3.0.3 - 3.0.18 only, PHP 4 >= 4.0.0)

call_user_func -- Zavolat uživatelskou funkci určenou prvním argumentem

Popis

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

Zavolá uživatelsky definouvanou funkci určenou argumentem function_name. Zvažte následující ukázku:

function barber ($type) {
    print "You wanted a $type haircut, no problem";
}
call_user_func ('barber', "mushroom");
call_user_func ('barber', "shave");