summaryrefslogtreecommitdiff
path: root/Zend/tests/bug35163_3.phpt
blob: 6c6a57f2541cd35acd2dfabe8076ee993b53bd07 (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
--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;
?>
--EXPECTF--
object(stdClass)#%d (1) {
  ["b"]=>
  &array(3) {
    [0]=>
    int(2)
    [1]=>
    *RECURSION*
    [2]=>
    *RECURSION*
  }
}