ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#40965 [Opn->Bgs]: constructor executing aborted
by mike other posts by this author
Mar 30 2007 11:25PM messages near this date
#40965 [NEW]: constructor executing aborted | #40964 [NEW]: Variable lost data using session
ID:               40965
 Updated by:       mike@[...].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
Thread:
Gabor Dot Toth At Prolabor Dot Hu
mike

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved