xref: /PHP-8.0/ext/opcache/tests/jit/array_elem.phpt (revision 6c6d36bb)
1--TEST--
2Refcount inference when adding array elements
3--FILE--
4<?php
5
6function test($a) {
7    $ary = [$a];
8    $ary2 = [0, $ary, $ary];
9    return $ary2;
10}
11var_dump(test(1));
12
13?>
14--EXPECT--
15array(3) {
16  [0]=>
17  int(0)
18  [1]=>
19  array(1) {
20    [0]=>
21    int(1)
22  }
23  [2]=>
24  array(1) {
25    [0]=>
26    int(1)
27  }
28}
29