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);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 23
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 23
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 22
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/uO1eW
function name:  (null)
number of ops:  28
compiled vars:  !0 = $orders, !1 = $chitchattracking, !2 = $tracking, !3 = $chitchat, !4 = $order, !5 = $order_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   35     1        ASSIGN                                                   !1, <array>
   48     2        ASSIGN                                                   !2, <array>
   49     3        INIT_FCALL                                               'array_column'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 null
          6        SEND_VAL                                                 'order_id'
          7        DO_ICALL                                         $9      
          8        ASSIGN                                                   !3, $9
   50     9      > FE_RESET_R                                       $11     !0, ->23
         10    > > FE_FETCH_R                                               $11, !4, ->23
   51    11    >   FETCH_DIM_R                                      ~12     !4, 'order_id'
         12        ASSIGN                                                   !5, ~12
   52    13        ISSET_ISEMPTY_DIM_OBJ                         0          !3, !5
         14      > JMPZ                                                     ~14, ->22
   53    15    >   INIT_FCALL                                               'array_merge'
         16        SEND_VAR                                                 !4
         17        FETCH_DIM_R                                      ~16     !3, !5
         18        SEND_VAL                                                 ~16
         19        DO_ICALL                                         $17     
         20        ASSIGN_DIM                                               !2
         21        OP_DATA                                                  $17
   50    22    > > JMP                                                      ->10
         23    >   FE_FREE                                                  $11
   56    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.79 ms | 1008 KiB | 16 Q