xref: /PHP-5.3/Zend/tests/bug35163_3.phpt (revision 610c7fbe)
1--TEST--
2Bug #35163.3 (Array elements can lose references)
3--FILE--
4<?php
5$a = new stdClass;
6$a->b = array(1);
7$a->b[] =& $a->b;
8$a->b[] =& $a->b;
9$a->b[0] = 2;
10var_dump($a);
11$a->b = null;
12$a = null;
13?>
14--EXPECTF--
15object(stdClass)#%d (1) {
16  ["b"]=>
17  &array(3) {
18    [0]=>
19    int(2)
20    [1]=>
21    *RECURSION*
22    [2]=>
23    *RECURSION*
24  }
25}
26