|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-22 15:04 UTC] xxoes at nw7 dot de
[2006-02-22 16:42 UTC] iliaa@php.net
[2006-02-23 08:05 UTC] xxoes at nw7 dot de
[2006-02-23 10:16 UTC] cweiske@php.net
[2006-03-28 12:55 UTC] mike@php.net
[2006-03-28 14:14 UTC] xxoes at nw7 dot de
[2009-01-06 21:03 UTC] auroraeosrose@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
Description: ------------ Although the objects have the same object id after destruction, "===" doesn't equal them any more. I try: $abc = new abc(); $obj = new bla(); and: $abc = new abc(); $obj = new bla(); both the same result. This does not happen when you remove "extends GtkObject" from the class signature. Reproduce code: --------------- <?PHP class bla extends GtkObject { public $xparent; function __construct() { } function __destruct() { echo "bla::__destruct()\r\n"; $this->xparent->remove($this); } } class abc { function __destruct() { echo "abc::__destruct()\r\n"; } function put($obj) { $this->obj = $obj; $obj->xparent = $this; } function remove($obj) { echo "Object matched?: ".($this->obj === $obj)."\r\n"; echo $this->obj." ".$obj."\r\n"; } } $abc = new abc(); $obj = new bla(); $abc->put($obj); ?> Expected result: ---------------- That the operation $this->obj === $obj is true. Actual result: -------------- $this->obj and $obj mismatch.