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); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 36
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 36
Branch analysis from position: 17
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 34
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 34
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 33
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 33
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 34
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/Xu1U4
function name:  (null)
number of ops:  41
compiled vars:  !0 = $array1, !1 = $array2, !2 = $combined, !3 = $a, !4 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN_DIM                                               !0
          2        OP_DATA                                                  <array>
    4     3        ASSIGN_DIM                                               !0
          4        OP_DATA                                                  <array>
    5     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  <array>
    7     7        ASSIGN                                                   !1, <array>
    8     8        ASSIGN_DIM                                               !1
          9        OP_DATA                                                  <array>
    9    10        ASSIGN_DIM                                               !1
         11        OP_DATA                                                  <array>
   10    12        ASSIGN_DIM                                               !1
         13        OP_DATA                                                  <array>
   13    14        ASSIGN                                                   !2, <array>
   14    15      > FE_RESET_R                                       $14     !0, ->36
         16    > > FE_FETCH_R                                               $14, !3, ->36
   15    17    > > FE_RESET_R                                       $15     !1, ->34
         18    > > FE_FETCH_R                                               $15, !4, ->34
   16    19    >   FETCH_DIM_R                                      ~16     !3, 2
         20        FETCH_DIM_R                                      ~17     !4, 0
         21        IS_EQUAL                                                 ~16, ~17
         22      > JMPZ                                                     ~18, ->33
   17    23    >   FETCH_DIM_R                                      ~20     !3, 0
         24        INIT_ARRAY                                       ~21     ~20
         25        FETCH_DIM_R                                      ~22     !3, 1
         26        ADD_ARRAY_ELEMENT                                ~21     ~22
         27        FETCH_DIM_R                                      ~23     !3, 2
         28        ADD_ARRAY_ELEMENT                                ~21     ~23
         29        FETCH_DIM_R                                      ~24     !4, 1
         30        ADD_ARRAY_ELEMENT                                ~21     ~24
         31        ASSIGN_DIM                                               !2
         32        OP_DATA                                                  ~21
   15    33    > > JMP                                                      ->18
         34    >   FE_FREE                                                  $15
   14    35      > JMP                                                      ->16
         36    >   FE_FREE                                                  $14
   22    37        INIT_FCALL                                               'print_r'
         38        SEND_VAR                                                 !2
         39        DO_ICALL                                                 
   23    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.8 ms | 1400 KiB | 15 Q