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
434 B
21 lines
434 B
--TEST--
|
|
array_fill(): last element
|
|
--SKIPIF--
|
|
<?php die("skip AOT does not throw error when appending to full array"); ?>
|
|
--FILE--
|
|
<?php
|
|
$a = array_fill(PHP_INT_MAX, 1, "foo");
|
|
var_dump(
|
|
count($a),
|
|
array_key_exists(PHP_INT_MAX, $a),
|
|
);
|
|
try {
|
|
$a[] = "bar";
|
|
} catch (Error $ex) {
|
|
echo $ex->getMessage(), PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
bool(true)
|
|
Cannot add element to the array as the next element is already occupied
|
|
|