3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array( 'a','b','c','d','e','f' ); $b = array( 'x', 'z', 'y' ); function arrayInsertAfter(&$array, $position, $insert) { return $array = array_merge(array_slice($array, 0, $position), $insert, array_slice($array, $position)); } print_r(arrayInsertAfter($a, 0, $b));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => x [1] => z [2] => y [3] => a [4] => b [5] => c [6] => d [7] => e [8] => f )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.83 ms | 401 KiB | 8 Q