Consider the following example :
function myTest(&$var)
{
$var++;
echo "var = {$var}\n";
}
$x = 42;
call_user_func('myTest', $x);
It shows the warning :
Warning: Parameter 1 to myTest() expected to be a reference, value given in /home/alain/workspace/echo/echo.php(57) : eval()'d code on line 7
Note: code written on an online sandbox, explaning the eval.
Any idea how I can pass reference to call_user_func family functions?