|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31582 extended overload classes not honouring overload
Submitted: 2005-01-17 11:36 UTC Modified: 2005-02-02 17:17 UTC
From: Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4CVS-2005-01-17 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2005-01-17 11:36 UTC]
the class of an overloaded class is not honouring the fact that it's parent is overloaded. (as per previous releases)

Reproduce code:
class ddo_base {
        echo "METHOD: ".$method;
    function __call($method,$args,&$return)  {
        return true;

class ddo extends ddo_test {

$x = new ddo_base;
$x = new ddo;

Expected result:
METHOD: ddo_testMETHOD: helloworldMETHOD: ddoMETHOD: helloworld

Actual result:
METHOD: ddo_testMETHOD: helloworld
Fatal error: Call to undefined function: helloworld() in ....


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-17 11:39 UTC]
agh... try again..

class ddo_base {
    function __call($method,$args,&$return)  {
        echo "METHOD:".$method;
        return true;

class ddo extends ddo_base {

$x = new ddo_base;

$x = new ddo;
 [2005-01-20 00:59 UTC]
Yet another overload bug..Stas, can you look into this too?
 [2005-02-02 16:32 UTC]
Overload changes class' handlers, but not it's descendants' handlers. Thus, class "ddo" doesn't know about handlers for ddo_base. Simplest way to fix it would be to do:

Other way would be to make fcall opcode to traverse all object hierarchy in hope there would be handler somewhere, but it seems to be somewhat slow.
 [2005-02-02 17:17 UTC]
Workaround exists -> won't fix.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Aug 15 22:05:43 2022 UTC