Re: bit of an odd bug
| From: | Adam Maccabee Trachtenberg | Date: | Tue, 04 Jan 2005 03:24:18 +0000 |
| Subject: | Re: bit of an odd bug | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-14270@lists.php.net to get a copy of this message | ||
On Tue, 4 Jan 2005, Gareth Ardron wrote:
> Somebody just tell me that this isn't exactly expected behaviour and
> it's a minor bug
This is a known limitation. I suggest using the reflection classes to
work around this.
class foo {
static function bar() {
print "static method!\n";
}
}
$class = 'foo';
$method = 'bar';
$x = new ReflectionMethod($class, $method);
$x->invoke(NULL);
-adam
--
adam@trachtenberg.com | http://www.trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!