3v4l.org

run code in 500+ PHP versions simultaneously
<?php $arrays = [ [ "1-1", "1-2", "1-1", "1-2", "1-1", ], [ "3-3", "3-3", "3-4", "3-4", "3-3", ], ]; $first = array_shift($arrays); $res = array_reduce($arrays, function($carry, $item){ foreach($item as $key => $value) { $carry[$key] = $carry[$key] . "," . $value; } return $carry; }, $first); print_r($res);
Output for rfc.property-hooks, git.master, git.master_jit
Array ( [0] => 1-1,3-3 [1] => 1-2,3-3 [2] => 1-1,3-4 [3] => 1-2,3-4 [4] => 1-1,3-3 )

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.55 ms | 2493 KiB | 4 Q