ID:               36487
 User updated by:  xxoes at nw7 dot de
 Reported By:      xxoes at nw7 dot de
 Status:           Open
-Bug Type:         PHP-GTK related
+Bug Type:         *General Issues
 Operating System: windows & linux
 PHP Version:      5.1.2
 New Comment:

This is not PHP-GTK related.
If you replace GtkObject with DOMElement you get the same result.


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

[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

Reply via email to