3v4l.org

run code in 300+ PHP versions simultaneously
<?php $first = [ "Catalog No.:", "H-B No.", ]; $second = [ [ "GG", "692" ], [ "VV", "693" ] ]; $result = array_map(function($arr) use ($first){ foreach($first as $key => $value) { $arr[$key] = $value . ' ' . $arr[$key]; } return $arr; }, $second); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NWlnG
function name:  (null)
number of ops:  13
compiled vars:  !0 = $first, !1 = $second, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
   18     2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNWlnG%3A18%240'
          4        BIND_LEXICAL                                             ~5, !0
   23     5        SEND_VAL                                                 ~5
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
   18     8        ASSIGN                                                   !2, $6
   25     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNWlnG%3A18%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 11
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/NWlnG
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $arr, !1 = $first, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   19     2      > FE_RESET_R                                       $4      !1, ->11
          3    > > FE_FETCH_R                                       ~5      $4, !2, ->11
          4    >   ASSIGN                                                   !3, ~5
   20     5        CONCAT                                           ~8      !2, '+'
          6        FETCH_DIM_R                                      ~9      !0, !3
          7        CONCAT                                           ~10     ~8, ~9
          8        ASSIGN_DIM                                               !0, !3
          9        OP_DATA                                                  ~10
   19    10      > JMP                                                      ->3
         11    >   FE_FREE                                                  $4
   22    12      > RETURN                                                   !0
   23    13*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNWlnG%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.58 ms | 1401 KiB | 17 Q