Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14270 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42801 invoked by uid 1010); 4 Jan 2005 03:24:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42727 invoked from network); 4 Jan 2005 03:24:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2005 03:24:49 -0000 X-Host-Fingerprint: 209.58.150.153 miranda.org Linux 2.4/2.6 Received: from ([209.58.150.153:60161] helo=miranda.org) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id FD/30-27561-F7C0AD14 for ; Mon, 03 Jan 2005 22:24:49 -0500 Received: (qmail 16261 invoked by uid 546); 4 Jan 2005 03:24:18 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 4 Jan 2005 03:24:18 -0000 Date: Mon, 3 Jan 2005 22:24:18 -0500 (EST) X-X-Sender: adam@miranda.org To: Gareth Ardron cc: internals@lists.php.net In-Reply-To: <41DA068A.9080009@fission.org.uk> Message-ID: References: <41DA068A.9080009@fission.org.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] bit of an odd bug From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) 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!