I have lots of lines this kind of code. call('someCustomFunctionName', array($paramA, ¶mB, $paramC));
I have updated my server php version and it wont work anymore.
Here is SIMPLIFIED code for testing purpose. Expected output: $b is true and $c is 2
function call($function, $param_arr = array())
{
# Lots of code here.
return function_exists($function) ? call_user_func_array( $function, (array) $param_arr) : '';
}
function test_a($a, $b, $c)
{
if($a['a'] == 1)
{
$b = true;
$c++;
}
}
$a = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4);
$b = false;
$c = 1;
call('test_a', array($a, &$b, &$c));
if($b)
{
print '$b is true';
}
else{
print '$b is false';
}
print '<br>';
print $c;