It fires out when I try to call function with argument by reference
function test(&$a) ...
through
call_user_func(\'tes
You might consider the closure concept with a reference variable tucked into the "use" declaration. For example:
$note = 'before';
$cbl = function( $msg ) use ( &$note )
{
echo "Inside callable with $note and $msg\n";
$note = "$msg has been noted";
};
call_user_func( $cbl, 'after' );
echo "$note\n";
Bit of a workaround for your original problem but if you have a function that needs call by reference, you can wrap a callable closure around it, and then execute the closure via call_user_func().