Is this a bug?

From: Date: Fri, 20 Jul 2001 09:47:17 +0000
Subject: Is this a bug?
Groups: php.dev 
Request: Send a blank email to php-dev+get-60360@lists.php.net to get a copy of this message
<?php class foo { function bar() { print 'bar() called<br>'; } } $foo = new foo(); $bar =& $foo; $method = 'bar'; $foo->$method; // does not work $bar->$method; // does not work call_user_method($method, $foo); // works call_user_method($method, $bar); // works ?> I think this is a bug, and all four ways to invoke the method must have worked at some time in the past (I tested with latest 4.0.7-dev CVS on Win32), since PEAR uses the first/second method to invoke its 'emulated destructors'. -- Sebastian Bergmann Measure Traffic & Usability http://sebastian-bergmann.de/ http://phpOpenTracker.de/

« previous php.dev (#60360) next »