1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/opcache/tests/jit/array_elem.phpt
2019-12-30 13:29:32 +01:00

29 lines
313 B
PHP

--TEST--
Refcount inference when adding array elements
--FILE--
<?php
function test($a) {
$ary = [$a];
$ary2 = [0, $ary, $ary];
return $ary2;
}
var_dump(test(1));
?>
--EXPECT--
array(3) {
[0]=>
int(0)
[1]=>
array(1) {
[0]=>
int(1)
}
[2]=>
array(1) {
[0]=>
int(1)
}
}