3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 28; $columnCount = 4; for($i = 1, $loopCounter = 1; $i <= $number; $i = $i + $columnCount, $loopCounter++) { $range = range($i, $i+$columnCount - 1); if($loopCounter % 2 === 0) { $range = array_reverse($range); } foreach($range as $n) { echo str_pad($n, 2, ' ', STR_PAD_LEFT) . " "; } echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
1 2 3 4 8 7 6 5 9 10 11 12 16 15 14 13 17 18 19 20 24 23 22 21 25 26 27 28

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