3v4l.org

run code in 300+ PHP versions simultaneously
<?php $order_ids = array(8,9,10,4,7); $arr = [ [4, 23, 1], [9, 66, 4], [8, 17, 3], ]; foreach($order_ids as $id) { foreach($arr as $record) { if($record[0] == $id) { $newArr[] = $record; break; } } } print_r($newArr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => 8 [1] => 17 [2] => 3 ) [1] => Array ( [0] => 9 [1] => 66 [2] => 4 ) [2] => Array ( [0] => 4 [1] => 23 [2] => 1 ) )

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:
30.87 ms | 402 KiB | 8 Q