Annotation of embedaddon/php/Zend/tests/bug35239.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #35239 (Objects can lose references)
                      3: --FILE--
                      4: <?php
                      5: $a = new stdClass; 
                      6: $a->x0 = new stdClass;
                      7: $a->x0->y0 = 'a';
                      8: $a->x0->y1 =& $a->x0;
                      9: $a->x0->y2 =& $a->x0;
                     10: $a->x0->y0 = 'b';
                     11: var_dump($a);
                     12: $a->x0->y1 = "ok\n";
                     13: echo $a->x0;
                     14: ?>
                     15: --EXPECTF--
                     16: object(stdClass)#%d (1) {
                     17:   ["x0"]=>
                     18:   &object(stdClass)#%d (3) {
                     19:     ["y0"]=>
                     20:     string(1) "b"
                     21:     ["y1"]=>
                     22:     *RECURSION*
                     23:     ["y2"]=>
                     24:     *RECURSION*
                     25:   }
                     26: }
                     27: ok

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>