1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/opcache/tests/jit/cast_001.phpt
2024-03-13 21:40:26 +01:00

25 lines
321 B
PHP

--TEST--
JIT CAST: 001
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit=1205
;opcache.jit_debug=1
--EXTENSIONS--
opcache
--FILE--
<?php
function foo (?int $x = null) {
$a = (array)$x;
$a[] = 42;
var_dump($a);
}
foo(null);
?>
--EXPECT--
array(1) {
[0]=>
int(42)
}