1--TEST--
2array_pad() with too large padding should fail
3--FILE--
4<?php
5
6function test($length) {
7    try {
8        var_dump(array_pad(array("", -1, 2.0), $length, 0));
9    } catch (\ValueError $e) {
10        echo $e->getMessage() . "\n";
11    }
12}
13
14test(PHP_INT_MIN);
15test(PHP_INT_MAX);
16
17?>
18--EXPECT--
19array_pad(): Argument #2 ($length) must not exceed the maximum allowed array size
20array_pad(): Argument #2 ($length) must not exceed the maximum allowed array size
21