3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr_orderno = [12321,321,321]; $arr_deliverysn = [7,8,9]; $arr_deliverycorpname = ['asd','qwe','zxc']; $arr_merge = []; for($i = 0; $i < count($arr_orderno); $i++){ $arr_merge[$i] = [$arr_orderno[$i], $arr_deliverysn[$i], $arr_deliverycorpname[$i]]; } $arr_key = ['orderno', 'deliverysn', 'deliverycorpname']; $arr = []; foreach ($arr_merge as $value) { $arr[] = array_combine($arr_key, $value); } print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [orderno] => 12321 [deliverysn] => 7 [deliverycorpname] => asd ) [1] => Array ( [orderno] => 321 [deliverysn] => 8 [deliverycorpname] => qwe ) [2] => Array ( [orderno] => 321 [deliverysn] => 9 [deliverycorpname] => zxc ) )

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:
27.83 ms | 406 KiB | 5 Q