summaryrefslogtreecommitdiff
path: root/Zend/tests/bug47836.phpt
blob: 15afc68c48de215468e680bb3d577bdd0bc90124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value)
--FILE--
<?php

$arr[PHP_INT_MAX] = 1;
try {
    $arr[] = 2;
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

var_dump($arr);
?>
--EXPECTF--
Cannot add element to the array as the next element is already occupied
array(1) {
  [%d]=>
  int(1)
}