3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array(); $array1[] = array('45', '10640', '1041-0567041700116'); $array1[] = array('46', '10640', '1041-0567041700318'); $array1[] = array('207', '10645', '03320103000052'); $array2 = array(); $array2[] = array('03320103000052', '0'); $array2[] = array('10013800805001', '12'); $array2[] = array('1090-0360141758201', '3'); $combined = array(); foreach ($array1 as $a) { foreach ($array2 as $b) { if ($a[2] == $b[0]) { $combined[] = array($a[0], $a[1], $a[2], $b[1]); } } } print_r($combined); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => 207 [1] => 10645 [2] => 03320103000052 [3] => 0 ) )

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