Forum und email
call_user_func

call_user_func

(PHP 3 >= 3.0.3, PHP 4, PHP 5)

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

Popis

mixed call_user_func ( callback function [, 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");