why should one prefer call_user_func_array over regular calling of function?

前端 未结 6 2036
轮回少年
轮回少年 2020-12-12 20:41
function foobar($arg, $arg2) {
    echo __FUNCTION__, \" got $arg and $arg2\\n\";
}
foobar(\'one\',\'two\'); // OUTPUTS : foobar got one and two 

call_user_func_arr         


        
6条回答
  •  醉梦人生
    2020-12-12 21:12

     function1 )
    
    call_user_func_array(array($obj, $function_list[0]), array()); 
    
    // Output => in function 1
    
    ?>
    

提交回复
热议问题