3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['a1', 'a2', 'a3', 'a4', 'a5', 'a6', 'a7', 'a8', 'a9', 'a10']; $b = ['b1', 'b2', 'b3', 'b4', 'b5', 'b6', 'b7', 'b8', 'b9', 'b10']; $c = ['c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7', 'c8', 'c9', 'c10']; var_export( array_map( fn(...$cols) => array_merge(...$cols), ...array_map( fn($row) => array_chunk($row, 2), [$a, $b, $c] ) ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 0 => 'a1', 1 => 'a2', 2 => 'b1', 3 => 'b2', 4 => 'c1', 5 => 'c2', ), 1 => array ( 0 => 'a3', 1 => 'a4', 2 => 'b3', 3 => 'b4', 4 => 'c3', 5 => 'c4', ), 2 => array ( 0 => 'a5', 1 => 'a6', 2 => 'b5', 3 => 'b6', 4 => 'c5', 5 => 'c6', ), 3 => array ( 0 => 'a7', 1 => 'a8', 2 => 'b7', 3 => 'b8', 4 => 'c7', 5 => 'c8', ), 4 => array ( 0 => 'a9', 1 => 'a10', 2 => 'b9', 3 => 'b10', 4 => 'c9', 5 => 'c10', ), )

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:
126.79 ms | 407 KiB | 5 Q