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
488 B

--TEST--
array_pad() with too large padding should fail
--FILE--
<?php
function test($length)
{
try {
var_dump(array_pad(array("", -1, 2.0), $length, 0));
} catch (\ValueError $e) {
echo $e->getMessage() . "\n";
}
}
function main()
{
test(PHP_INT_MIN);
test(PHP_INT_MAX);
}
?>
--EXPECT--
array_pad(): Argument #2 ($length) must not exceed the maximum allowed array size
array_pad(): Argument #2 ($length) must not exceed the maximum allowed array size