3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test[(string)PHP_INT_MAX] = "bork"; $test[] = "borkborkbork"; var_dump($test);
based on lubAa
Output for 5.2.10 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: Cannot add element to the array as the next element is already occupied in /in/2Fjl4 on line 3 array(1) { [9223372036854775807]=> string(4) "bork" }
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.2.9
array(2) { ["9223372036854775807"]=> string(4) "bork" [0]=> string(12) "borkborkbork" }
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
Notice: Use of undefined constant PHP_INT_MAX - assumed 'PHP_INT_MAX' in /in/2Fjl4 on line 2 array(2) { ["PHP_INT_MAX"]=> string(4) "bork" [0]=> string(12) "borkborkbork" }