3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(1 => 0, 2, 3, 4); array_splice($array, 3, count($array), array_merge(array('x'), array_slice($array, 3))); print_r($array); ?>
Output for 4.3.0 - 7.1.0
Array ( [0] => 0 [1] => 2 [2] => 3 [3] => x [4] => 4 )