calling static methods of variable class names
| From: | Ahmed Saad | Date: | Tue, 22 Nov 2005 13:42:12 +0000 |
| Subject: | calling static methods of variable class names | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-226261@lists.php.net to get a copy of this message | ||
hi all,
how can i call static methods of a class whose name is variable.. something like
<? $className::doSomething(); // throws a parser error ?>
I can do this with reflection by creating a ReflectionMethod object
then invoke()ing it, but is there a better way?
Thanks
-ahmed