TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

21 lines
398 B

--TEST--
std array: 001
--FILE--
<?php
function main() {
$array = std::array(native_types::type_int, 100);
$array[99] = 2026;
var_dump($array[99]);
var_dump($array[10]);
try {
$index = 100;
var_dump($array[$index]);
} catch (throwable $e) {
echo $e->getMessage();
}
}
?>
--EXPECT--
int(2026)
int(0)
Array index out of bounds: index 100, size 100