ID: 40965
Updated by: [EMAIL PROTECTED]
Reported By: gabor dot toth at prolabor dot hu
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: irrevelant
PHP Version: 5.2.1
New Comment:
This generates an endless loop.
Either use self::__construct() or don't write such senseless code.
Previous Comments:
------------------------------------------------------------------------
[2007-03-30 22:12:15] gabor dot toth at prolabor dot hu
Description:
------------
Source code doesn't run. I've tried it in my XP width apache 2.2 and
php 5.2.1, and on a linux server with apache 2.0 and php 4.4.0
I have known about this bug long time, but now i managed to repoduce
it.
As you see derived class constructor calls super constructor, these
class made to compatible width php 4 and 5.
Reproduce code:
---------------
class Super {
function Super() { $this->__construct(); }
function __construct() { echo "Super\n"; }
}
class Derived extends Super {
function __construct() { $this->Derived(); }
function Derived() { parent::Super(); echo "Derived"; }
}
$a = new Derived();
Expected result:
----------------
Super
Derived
Actual result:
--------------
nothing at all.
apache log:
Parent: child process exited with status 3221225477 -- Restarting.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40965&edit=1