ID:               20670
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Verified
+Status:           Won\'t fix
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      4.3.0-dev
 New Comment:

Will be fixed in Engine 2.


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

[2002-11-27 03:36:35] [EMAIL PROTECTED]


$globalref_bar===NULL  after  $o2 = &new Bar();

Source
----------------------------
<?
    $globalref_foo = array();
    $globalref_bar = null;

        class Foo {
                function Foo()
                {
                        global $globalref_foo;
                        $globalref_foo[] = &$this;
                }
        }

        class Bar {
                function Bar()
                {
                        global $globalref_bar;
                        $globalref_bar = &$this;
                }
        }

        $o1 = &new Foo();
        $o2 = &new Bar();

        var_dump($globalref_foo);
        var_dump($globalref_bar);
        var_dump($o1);
        var_dump($o2);
?>

Output:
----------------------------
array(1) {
  [0]=>
  &object(foo)(0) {
  }
}
NULL
object(foo)(0) {
}
object(bar)(0) {
}
-----------------------------


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


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

Reply via email to