3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr1 = array(); $arr1[9999999999999999999999999999999] = "abc"; var_dump($arr1); $arr2 = array(); $arr2["9999999999999999999999999999999"]="abc"; var_dump($arr2);
Output for 5.5.24 - 7.1.0
array(1) { [-4571153621781053440]=> string(3) "abc" } array(1) { ["9999999999999999999999999999999"]=> string(3) "abc" }
Output for 5.3.0 - 5.4.45
array(1) { [0]=> string(3) "abc" } array(1) { ["9999999999999999999999999999999"]=> string(3) "abc" }
Output for 4.3.0 - 5.2.17
array(1) { [-9223372036854775808]=> string(3) "abc" } array(1) { ["9999999999999999999999999999999"]=> string(3) "abc" }