3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = array( '1','2','3','4','5' ); echo 'Original array : <br />'; foreach ($original as $x) {echo "$x ";} $inserted = '$'; array_splice( $original, 3, 0, $inserted ); echo " <br /> After inserting '$' the array is :<br />"; foreach ($original as $x) {echo "$x ";} ?> - See more at: http://www.w3resource.com/php-exercises/php-array-exercises.php#sthash.XlnDnR3J.dpuf

preferences:
39.96 ms | 402 KiB | 5 Q