|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
#36487 [NEW]: object === same object mismatchFrom: xxoes at nw7 dot de
Operating system: windows & linux PHP version: 5.1.2 PHP Bug Type: PHP-GTK related Bug description: object === same object mismatch 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. -- Edit bug report at http://bugs.php.net/?id=36487&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36487&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36487&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36487&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36487&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36487&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36487&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36487&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36487&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36487&r=support Expected behavior: http://bugs.php.net/fix.php?id=36487&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36487&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36487&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36487&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36487&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36487&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36487&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36487&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36487&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36487&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36487&r=mysqlcfg -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
Re: #36487 [NEW]: object === same object mismatchxxoes at nw7 dot de wrote:
> From: xxoes at nw7 dot de > Operating system: windows & linux > PHP version: 5.1.2 > PHP Bug Type: PHP-GTK related > Bug description: object === same object mismatch > > Description: > ------------ > This does not happen when you remove "extends GtkObject" from the class > signature. I don't think this is PHP-GTK related. If you replace GtkObject with DOMElement you get the same result. Double check the general PHP bugs and if it hasn't been reported yet, you should switch this over to a regular PHP bug. -- Scott Mattocks http://www.crisscott.com -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
#36487 [Opn]: object === same object mismatch ID: 36487
Updated by: mike@... Reported By: xxoes at nw7 dot de Status: Open -Bug Type: *General Issues +Bug Type: PHP-GTK related Operating System: windows & linux PHP Version: 5.1.2 New Comment: So this is GTK related then, isn't it? Previous Comments: ------------------------------------------------------------------------ [2006-02-23 10:16:37] cweiske@... As far as I see that, the objects *are* identical. They equal === as long as they are not in the process of being destroyed - but as soon as the destroying process is begun, they don't equal any more although they are still equal ------------------------------------------------------------------------ [2006-02-23 08:05:56] xxoes at nw7 dot de Sorry but i don't understand! Thats are the same objects and the same instances, and === doesn't matched! It works fine if a call $obj->__destruct === is true, but not if this function is called by php on exit. ------------------------------------------------------------------------ [2006-02-22 16:42:39] iliaa@... Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php For === to return true on object comparison both objects must be instances of the same class and refer to the exact same internal object. ------------------------------------------------------------------------ [2006-02-22 15:04:40] xxoes at nw7 dot de This is not PHP-GTK related. If you replace GtkObject with DOMElement you get the same result. ------------------------------------------------------------------------ [2006-02-22 14:33:03] xxoes at nw7 dot de 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36487&edit=1 -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
#36487 [Opn]: object === same object mismatch ID: 36487
User updated by: xxoes at nw7 dot de Reported By: xxoes at nw7 dot de Status: Open Bug Type: PHP-GTK related Operating System: windows & linux PHP Version: 5.1.2 New Comment: No isn't php-gtk related. Is a general problem because DOMElement and GtkObject have the same result. Previous Comments: ------------------------------------------------------------------------ [2006-03-28 12:55:19] mike@... So this is GTK related then, isn't it? ------------------------------------------------------------------------ [2006-02-23 10:16:37] cweiske@... As far as I see that, the objects *are* identical. They equal === as long as they are not in the process of being destroyed - but as soon as the destroying process is begun, they don't equal any more although they are still equal ------------------------------------------------------------------------ [2006-02-23 08:05:56] xxoes at nw7 dot de Sorry but i don't understand! Thats are the same objects and the same instances, and === doesn't matched! It works fine if a call $obj->__destruct === is true, but not if this function is called by php on exit. ------------------------------------------------------------------------ [2006-02-22 16:42:39] iliaa@... Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php For === to return true on object comparison both objects must be instances of the same class and refer to the exact same internal object. ------------------------------------------------------------------------ [2006-02-22 15:04:40] xxoes at nw7 dot de This is not PHP-GTK related. If you replace GtkObject with DOMElement you get the same result. ------------------------------------------------------------------------ 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/36487 -- Edit this bug report at http://bugs.php.net/?id=36487&edit=1 -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
|
|
#36487 [Opn->Bgs]: object === same object mismatch ID: 36487
Updated by: auroraeosrose@... Reported By: xxoes at nw7 dot de -Status: Open +Status: Bogus Bug Type: PHP-GTK related Operating System: * PHP Version: 5.1.2 New Comment: The order that objects are destroyed in cannot be guaranteed, so it's generally a good idea not to be trying to fiddle with objects (even objects stored inside other objects) in destructors Previous Comments: ------------------------------------------------------------------------ [2006-03-28 14:14:10] xxoes at nw7 dot de No isn't php-gtk related. Is a general problem because DOMElement and GtkObject have the same result. ------------------------------------------------------------------------ [2006-03-28 12:55:19] mike@... So this is GTK related then, isn't it? ------------------------------------------------------------------------ [2006-02-23 10:16:37] cweiske@... As far as I see that, the objects *are* identical. They equal === as long as they are not in the process of being destroyed - but as soon as the destroying process is begun, they don't equal any more although they are still equal ------------------------------------------------------------------------ [2006-02-23 08:05:56] xxoes at nw7 dot de Sorry but i don't understand! Thats are the same objects and the same instances, and === doesn't matched! It works fine if a call $obj->__destruct === is true, but not if this function is called by php on exit. ------------------------------------------------------------------------ [2006-02-22 16:42:39] iliaa@... Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php For === to return true on object comparison both objects must be instances of the same class and refer to the exact same internal object. ------------------------------------------------------------------------ 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/36487 -- Edit this bug report at http://bugs.php.net/?id=36487&edit=1 -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
| Free embeddable forum powered by Nabble | Forum Help |