ID:               29098
 Updated by:       [EMAIL PROTECTED]
 Reported By:      antonr at game dot permonline dot ru
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Irrelevant
 PHP Version:      5CVS-2004-07-12 (dev)
 New Comment:

Reproducable under Win2k with latest snapshot, but works ok under
Linux.
Valgrind doesn't show any errors about it.


Previous Comments:
------------------------------------------------------------------------

[2004-07-13 16:11:38] fixxxer at php5 dot ru

Updating to the latest snapshot seems to fix the problem.

------------------------------------------------------------------------

[2004-07-12 19:56:03] antonr at game dot permonline dot ru

Bug is independent of OS

------------------------------------------------------------------------

[2004-07-12 19:47:52] antonr at game dot permonline dot ru

Linux Mandrake 10.0: the same behaviour.

------------------------------------------------------------------------

[2004-07-12 06:58:58] antonr at game dot permonline dot ru

On last snap Jul 12, 2004 02:30 GMT

php-cgi.exe outputs nothing to browser and crushes.

php.exe outputs:
ChildClass::__destruct()<br>
ParentClass::__construct()<br>
and then crushes.

One else bug: why ChildClass::__destruct are called before
ParentClass::__construct? You see, the reference on ChildClass instance
must be passed to ParentClass::__construct.

If I change the line 
new ParentClass(new ChildClass());
to
$a = new ParentClass(new ChildClass());


php-cgi.exe and php.exe output same result:

ParentClass::__construct()<br>
ChildClass::setParent()<br>
ParentClass::__destruct()<br>
ChildClass::__destruct()<br>

and not crash.

------------------------------------------------------------------------

[2004-07-11 23:07:32] [EMAIL PROTECTED]

How do you mean possibly? My output with script given:

PHP Fatal error:  Call to a member function setParent() on a non-object
in test.php on line 7
ParentClass::__destruct()<br>

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/29098

-- 
Edit this bug report at http://bugs.php.net/?id=29098&edit=1

Reply via email to