3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $c = array(PHP_INT_MAX => 'heleo'); array_push($c, 'plop'); var_dump($c);
Output for 5.2.10 - 5.6.28, 7.0.0 - 7.1.0
Warning: array_push(): Cannot add element to the array as the next element is already occupied in /in/sG1XQ on line 4 array(1) { [9223372036854775807]=> string(5) "heleo" }
Output for hhvm-3.10.0 - 3.13.2
Warning: Cannot add element to the array as the next element is already occupied in /in/sG1XQ on line 4 array(1) { [9223372036854775807]=> string(5) "heleo" }
Output for 4.4.0 - 4.4.9, 5.0.5 - 5.2.9
array(2) { [9223372036854775807]=> string(5) "heleo" [-9223372036854775808]=> string(4) "plop" }
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/sG1XQ on line 3 array(2) { ["PHP_INT_MAX"]=> string(5) "heleo" [0]=> string(4) "plop" }