Re: how to invoke ReflectionMethod and pass variable by reference as argument?



$rc = new ReflectionClass('K2');
$rm = $rc->getMethod('increment');
$rm->invoke($a ,$c);

Weird indeed.
Does it work when using call_user_func, or call_user_func_array maybe?
like call_user_func(array($a, 'increment'), $c) or something. it may
be the reflection lib. or i'm missing something.
.