1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Files
archived-php-src/ext/opcache/tests/bug78230.phpt
2019-07-03 10:20:07 +02:00

30 lines
317 B
PHP

--TEST--
Bug #78230: Incorrect type check optimization
--FILE--
<?php
function test($x) {
$y = (array) $x;
var_dump(is_array($y));
}
$ary = [1, 2];
$ary[] = 3;
test($ary);
$ary[] = 4;
var_dump($ary);
?>
--EXPECT--
bool(true)
array(4) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
}