3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $def = array( 1 => 'on', 2 => 'on', 3 => 'on'); $fill = array( 2 => 'off' ); $res = array_merge($fill, $def); print_r($res);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => off [1] => on [2] => on [3] => on )