3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [ 'id' => 12345 ], [ 'date_entered' => 'today' ] ]; $array2 = [ ['id' => NULL], [ 'date entered' => 'yesterday' ] ]; $result = array(); foreach($array1 as $key => $value){ $result = array_merge_recursive($array1[0],$array2[0]); } print_r($result); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/6oer2
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array1, !1 = $array2, !2 = $result, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   14     3      > FE_RESET_R                                       $8      !0, ->14
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->14
          5    >   ASSIGN                                                   !4, ~9
   15     6        INIT_FCALL                                               'array_merge_recursive'
          7        FETCH_DIM_R                                      ~11     !0, 0
          8        SEND_VAL                                                 ~11
          9        FETCH_DIM_R                                      ~12     !1, 0
         10        SEND_VAL                                                 ~12
         11        DO_ICALL                                         $13     
         12        ASSIGN                                                   !2, $13
   14    13      > JMP                                                      ->4
         14    >   FE_FREE                                                  $8
   18    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
   19    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.56 ms | 1399 KiB | 17 Q