3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArrays = array( array(1, 2, 3, 4), array(5, 6, 7, 8), array(9, 10, 11, 12), array(13, 14, 15, 16) ); $index = 0; $myArrays = array_map(function ($v) use (&$index, $myArrays) { if (($index % 2) != 0) { echo implode("\n", array_reverse(array_column($myArrays, $index))) . "\n"; } else { echo implode("\n", array_column($myArrays, $index)) . "\n"; } $index++; }, $myArrays);
Output for git.master, git.master_jit, rfc.property-hooks
1 5 9 13 14 10 6 2 3 7 11 15 16 12 8 4

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:
73.49 ms | 405 KiB | 5 Q