3v4l.org

run code in 300+ PHP versions simultaneously
<?php $orders = array ( 0 => array ( 'order_id' => 45145, 'customers_email_address' => 'test@test.com', 'customers_name' => 'testname' ), 1 => array ( 'order_id' => 45136, 'customers_email_address' => 'test@yahoo.com', 'customers_name' => 'testname' ), 2 => array ( 'order_id' => 45117, 'customers_email_address' => 'test@yahoo.com', 'customers_name' => 'testname' ), 3 => array ( 'order_id' => 44959, 'customers_email_address' => 'test@gmail.com', 'customers_name' => 'testname' ), 4 => array ( 'order_id' => 44938, 'customers_email_address' => 'test@hotmail.com', 'customers_name' => 't' ) ); $chitchattracking = array ( 1 => array ( 'order_id' => 44938, 'carrier_tracking_code' => 9205590221582717655498 ), 2 => array ( 'order_id' => 44854, 'carrier_tracking_code' => 92055902215827 ) ); $tracking = array(); $chitchat = array_column($chitchattracking, null, 'order_id'); foreach ($orders as $order) { $order_id = $order['order_id']; if (isset($chitchat[$order_id])) { $tracking[] = array_merge($order, $chitchat[$order_id]); } } print_r($tracking);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [order_id] => 44938 [customers_email_address] => test@hotmail.com [customers_name] => t [carrier_tracking_code] => 9.2055902215827E+21 ) )

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