3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = [0=> 'zero', cheese=>'three', 2=>'two']; print_r($test); $test = array_merge($test); print_r($test);
based on jmcTB
Output for 7.2.0 - 7.3.0rc3
Warning: Use of undefined constant cheese - assumed 'cheese' (this will throw an Error in a future version of PHP) in /in/mvB7D on line 3 Array ( [0] => zero [cheese] => three [2] => two ) Array ( [0] => zero [cheese] => three [1] => two )
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.1.20
Notice: Use of undefined constant cheese - assumed 'cheese' in /in/mvB7D on line 3 Array ( [0] => zero [cheese] => three [2] => two ) Array ( [0] => zero [cheese] => three [1] => two )