3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_keys(array(9223372036854775806=>0, 1, 2, 3, 4)));
Output for 5.6.28, 7.0.14 - 7.1.0
Warning: Cannot add element to the array as the next element is already occupied in /in/270l8 on line 2 Warning: Cannot add element to the array as the next element is already occupied in /in/270l8 on line 2 Warning: Cannot add element to the array as the next element is already occupied in /in/270l8 on line 2 array(2) { [0]=> int(9223372036854775806) [1]=> int(9223372036854775807) }
Output for 5.2.10 - 5.6.25, 7.0.0 - 7.0.10
array(2) { [0]=> int(9223372036854775806) [1]=> int(9223372036854775807) }
Output for hhvm-3.10.0 - 3.12.0
Warning: Cannot add element to the array as the next element is already occupied Warning: Cannot add element to the array as the next element is already occupied Warning: Cannot add element to the array as the next element is already occupied array(2) { [0]=> int(9223372036854775806) [1]=> int(9223372036854775807) }
Output for 4.3.0 - 5.2.9
array(5) { [0]=> int(9223372036854775806) [1]=> int(9223372036854775807) [2]=> int(-9223372036854775808) [3]=> int(-9223372036854775807) [4]=> int(-9223372036854775806) }