PHP:call_user_func_array:通过引用传递 [英] PHP: call_user_func_array: pass by reference issue
本文介绍了PHP:call_user_func_array:通过引用传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当函数包含引用的参数时,以下函数会产生错误:
The below function generates error when a function contains referenced arguments eg:
function test(&$arg, &$arg2)
{
// some code
}
现在我不能将call_user_func_array
用于上述功能,它将产生一个错误.
Now I can not use call_user_func_array
for above function, it will generate an error.
如何解决这个问题?
我确实需要使用call_user_func_array
.
还假设我事先不知道它们是通过引用传递还是通过值传递.
Also assume that i don't know beforehand whether they are passed by reference or passed by value.
谢谢
推荐答案
The actual hack is surrounded by comments.
这篇关于PHP:call_user_func_array:通过引用传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文