Ahmed Saad wrote:
hi all,
how can i call static methods of a class whose name is variable.. something like
I can do this with reflection by creating a ReflectionMethod object
then invoke()ing it, but is there a better way?
try call_user_func() and/or call_user_func_array()
e.g.
call_user_fu
Ahmed,
call_user_func(array($className, 'doSomething'));
Cheers,
David Grant
Ahmed Saad wrote:
> hi all,
>
> how can i call static methods of a class whose name is variable.. something
> like
>
> I can do this with reflection by creating a ReflectionMethod object
> then invoke()ing it, but i
hi all,
how can i call static methods of a class whose name is variable.. something like
I can do this with reflection by creating a ReflectionMethod object
then invoke()ing it, but is there a better way?
Thanks
-ahmed
3 matches
Mail list logo