|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26543 call_user_func broken for self, parent
Submitted: 2003-12-06 11:08 UTC Modified: 2004-01-05 07:06 UTC
From: tater at potatoe dot com Assigned: stas
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2003-12-06 (dev) OS: *
Private report: No CVE-ID:
 [2003-12-06 11:08 UTC] tater at potatoe dot com
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:

2003-06-09  Stanislav Malyshev  <>

    * zend_API.c
      Support 'self' and 'parent' in call_user_func()

Reproduce code:
class fooparent
        function t() { print "fooparent::t()\n"; }
class foo extends fooparent
        function p()
$a = new foo;

Expected result:

Actual result:

Warning: call_user_func(parent::t): First argument is expected to be a valid callback in /my/path/bug.php on line 12


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-07 13:22 UTC]
Stanislav, can you check this out please?

 [2003-12-07 13:54 UTC] tater at potatoe dot com
btw, i reverted to before zend_make_callable() was added
(10/25), and this went away.
 [2004-01-05 07:06 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 11:01:54 2015 UTC