Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #40965 : constructor executing aborted
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 16th July 05:29
php-bugs
External User
 
Posts: 1
Default #40965 : constructor executing aborted


From: gabor dot toth at prolabor dot hu
Operating system: irrevelant
PHP version: 5.2.1
PHP Bug Type: Scripting Engine problem
Bug description: constructor executing aborted

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 bug report at http://bugs.php.net/?id=40965&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40965&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40965&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40965&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40965&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40965&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40965&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40965&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40965&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40965&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40965&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40965&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40965&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40965&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40965&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40965&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40965&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40965&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40965&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40965&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40965&r=mysqlcfg
  Reply With Quote


  sponsored links


2 16th July 05:29
External User
 
Posts: 1
Default #40965 : constructor executing aborted


ID: 40965
Updated by: mike@php.net
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
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666