Is it possible to pass parameters by reference using call_user_func_array()?

前端 未结 4 1456
情话喂你
情话喂你 2020-11-29 05:46

When using call_user_func_array() I want to pass a parameter by reference. How would I do this. For example

function toBeCalled( &$paramet         


        
4条回答
  •  误落风尘
    2020-11-29 06:18

    Except you are using deprecated functionality here. You'll generate a warning in PHP5 making it less than perfect.

    Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of runtime function name. If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in ...

    Unfortunately, there doesn't appear to be any other option as far as I can discover.

提交回复
热议问题