1--TEST--
2Next free element may overflow in array literals
3--FILE--
4<?php
5
6$i = PHP_INT_MAX;
7$array = [$i => 42, new stdClass];
8var_dump($array);
9
10const FOO = [PHP_INT_MAX => 42, "foo"];
11var_dump(FOO);
12
13?>
14--EXPECTF--
15Warning: Cannot add element to the array as the next element is already occupied in %s on line %d
16array(1) {
17  [%d]=>
18  int(42)
19}
20
21Warning: Cannot add element to the array as the next element is already occupied in %s on line %d
22array(1) {
23  [%d]=>
24  int(42)
25}
26