The below function generates error when a function contains referenced arguments eg:
function test(&$arg, &$arg2)
{
// some code
}
Now I can not use call_user_func_array
for above function, it will generate an error.
How to solve this problem?
I do need to use call_user_func_array
.
Also assume that i don't know beforehand whether they are passed by reference or passed by value.
Thanks
When storing your parameters in the array, make sure you are storing a reference to those parameters, it should work fine.
Ie:
call_user_func_array("test", array(¶m1, ¶m2));