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