|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-11 23:07 UTC] curt@php.net
[2004-07-12 06:58 UTC] antonr at game dot permonline dot ru
[2004-07-12 19:47 UTC] antonr at game dot permonline dot ru
[2004-07-12 19:56 UTC] antonr at game dot permonline dot ru
[2004-07-13 16:11 UTC] fixxxer at php5 dot ru
[2004-07-13 16:40 UTC] tony2001@php.net
[2005-01-14 23:59 UTC] tony2001@php.net
[2005-01-22 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 01:00:02 2025 UTC |
Description: ------------ When "new" operator appears without "=" operator, it is possibly crashes php Reproduce code: --------------- <?php class ParentClass { private $child; public function __construct($child) { echo "ParentClass::__construct()<br>\n"; $this->child = $child; $child->setParent($this); } public function __destruct() { echo "ParentClass::__destruct()<br>\n"; unset($this->child); } } class ChildClass { private $parent; public function setParent($parent) { echo "ChildClass::setParent()<br>\n"; $this->parent = $parent; } public function __destruct() { echo "ChildClass::__destruct()<br>\n"; unset($this->parent); } } new ParentClass(new ChildClass()); ?> Expected result: ---------------- ParentClass::__construct() ChildClass::setParent() and possibly ChildClass::__destruct() ParentClass::__destruct() Actual result: -------------- php crashes