summaryrefslogtreecommitdiff
path: root/Zend/tests/bug35163_3.phpt
blob: d2b3c25bfe3b20c0ab19187d67160b7378b690d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--TEST--
Bug #35163.3 (Array elements can lose references)
--FILE--
<?php
$a = new stdClass;
$a->b = array(1);
$a->b[] =& $a->b;
$a->b[] =& $a->b;
$a->b[0] = 2;
var_dump($a);
$a->b = null;
$a = null;
?>
--EXPECT--
object(stdClass)#1 (1) {
  ["b"]=>
  &array(3) {
    [0]=>
    int(2)
    [1]=>
    &array(3) {
      [0]=>
      int(2)
      [1]=>
      *RECURSION*
      [2]=>
      *RECURSION*
    }
    [2]=>
    &array(3) {
      [0]=>
      int(2)
      [1]=>
      *RECURSION*
      [2]=>
      *RECURSION*
    }
  }
}