例1:
function barber($type){
echo "you wanted a $type haircut, no problem
";
}
call_user_func('barber','mushroom');
返回:
you wanted a mushroom haircut, no problem
例2:
class myclass{
static function say_hello(){
echo "hello!
";
}
}
call_user_func(['myclass', 'say_hello']);
call_user_func("myclass::say_hello");
call_user_func([new myclass(), 'say_hello']);