1--TEST--
2array_fill(): last element
3--FILE--
4<?php
5$a = array_fill(PHP_INT_MAX, 1, "foo");
6var_dump(
7    count($a),
8    array_key_exists(PHP_INT_MAX, $a),
9);
10try {
11    $a[] = "bar";
12} catch (Error $ex) {
13    echo $ex->getMessage(), PHP_EOL;
14}
15?>
16--EXPECT--
17int(1)
18bool(true)
19Cannot add element to the array as the next element is already occupied
20