summaryrefslogtreecommitdiff
path: root/Zend/tests/gc_032.phpt
blob: 615b008e65df697a2b35d0e6f0e3d5d53a29a0c2 (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
40
--TEST--
GC 032: Crash in GC because of invalid reference counting
--FILE--
<?php
$a = array();
$b =& $a;
$a[0] = $a;
debug_zval_dump($a);
$a = array(array());
$b =& $a;
$a[0][0] = $a;
debug_zval_dump($a);
?>
--EXPECT--
array(1) refcount(1){
  [0]=>
  array(1) refcount(3){
    [0]=>
    array(1) refcount(3){
      [0]=>
      *RECURSION*
    }
  }
}
array(1) refcount(1){
  [0]=>
  array(1) refcount(3){
    [0]=>
    array(1) refcount(1){
      [0]=>
      array(1) refcount(3){
        [0]=>
        array(1) refcount(1){
          [0]=>
          *RECURSION*
        }
      }
    }
  }
}