PHP, how to pass func-get-args values to another function as list of arguments?

后端 未结 3 470
予麋鹿
予麋鹿 2020-12-29 20:38

I want to create a function (my_function()) getting unlimited number of arguments and passing it into another function (call_another_function()). <

3条回答
  •  萌比男神i
    2020-12-29 21:22

    Use call_user_func_array like

    call_user_func_array('another_function', func_get_args());
    

提交回复
热议问题