#26543 [Asn->Csd]: call_user_func broken for self, parent

From: Date: Mon, 05 Jan 2004 12:06:26 +0000
Subject: #26543 [Asn->Csd]: call_user_func broken for self, parent
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-52807@lists.php.net to get a copy of this message
ID: 26543 Updated by: stas@php.net Reported By: tater at potatoe dot com -Status: Assigned +Status: Closed Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2003-12-06 (dev) Assigned To: stas New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-12-07 13:54:58] tater at potatoe dot com btw, i reverted to before zend_make_callable() was added (10/25), and this went away. ------------------------------------------------------------------------ [2003-12-07 13:22:31] sniper@php.net Stanislav, can you check this out please? ------------------------------------------------------------------------ [2003-12-06 11:08:30] tater at potatoe dot com Description: ------------ Using call_user_func() for the equivalent of self::method() or parent::method() results in a warning. This has worked for quite some time, and as recently as beta2. From Zend/ChangeLog: <pre> 2003-06-09 Stanislav Malyshev <stas@zend.com> * zend_API.c zend_execute_API.c: Support 'self' and 'parent' in call_user_func() </pre> Reproduce code: --------------- class fooparent { function t() { print "fooparent::t()\n"; } } class foo extends fooparent { function p() { $this->t(); parent::t(); call_user_func(array('parent','t')); } } $a = new foo; $a->p(); Expected result: ---------------- fooparent::t() fooparent::t() fooparent::t() Actual result: -------------- fooparent::t() fooparent::t() Warning: call_user_func(parent::t): First argument is expected to be a valid callback in /my/path/bug.php on line 12 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26543&edit=1

« previous php.bugs (#52807) next »