Re: how to invoke ReflectionMethod and pass variable by reference as argument?
- From: "rafal.m" <rafal.m.malinowski@xxxxxxxxx>
- Date: Fri, 30 May 2008 14:57:20 -0700 (PDT)
On 30 Maj, 23:48, Egbert Teeselink <skreb...@xxxxxxxxx> wrote:
$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.
both:
call_user_func(array($a, 'increment'), $c);
and
call_user_method('increment',$a,$c);
gave me the same outcome:
before: 10
after: 10
r.
.
- Follow-Ups:
- References:
- how to invoke ReflectionMethod and pass variable by reference as argument?
- From: rafal.m
- Re: how to invoke ReflectionMethod and pass variable by reference as argument?
- From: Egbert Teeselink
- how to invoke ReflectionMethod and pass variable by reference as argument?
- Prev by Date: Re: sessions being destroyed prematurely
- Next by Date: Re: how to invoke ReflectionMethod and pass variable by reference as argument?
- Previous by thread: Re: how to invoke ReflectionMethod and pass variable by reference as argument?
- Next by thread: Re: how to invoke ReflectionMethod and pass variable by reference as argument?
- Index(es):