3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1,2,4,5,7); $zero = array(0); $length = 8; for ($i=0; $i < $length; $i++){ if ($a[$i] > $i + 1){ array_splice($a, 3, 0, $zero); } } var_dump($a);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 7 in /in/RBRuh on line 8 array(7) { [0]=> int(1) [1]=> int(2) [2]=> int(4) [3]=> int(0) [4]=> int(0) [5]=> int(5) [6]=> int(7) }

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:
41.41 ms | 401 KiB | 8 Q