From: tater at potatoe dot com
Operating system: *
PHP version: 5CVS-2003-12-06 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: call_user_func broken for self, parent
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 <[EMAIL PROTECTED]>
* 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 bug report at http://bugs.php.net/?id=26543&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26543&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26543&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26543&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26543&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26543&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26543&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26543&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26543&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26543&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26543&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26543&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26543&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26543&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26543&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26543&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26543&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26543&r=float