3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v_4 = [ [1, 2, 3], [4, 5, 6], ]; $v_5 = [ [7, 8, 9], [10, 11, 12], ]; $result = []; foreach ($v_4 as $i => $row) { foreach ($row as $k => $v) { $result[$i][$k] = $v + $v_5[$i][$k]; } } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 16
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/Tbu2D
function name:  (null)
number of ops:  23
compiled vars:  !0 = $v_4, !1 = $v_5, !2 = $result, !3 = $row, !4 = $i, !5 = $v, !6 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        ASSIGN                                                   !1, <array>
   12     2        ASSIGN                                                   !2, <array>
   13     3      > FE_RESET_R                                       $10     !0, ->18
          4    > > FE_FETCH_R                                       ~11     $10, !3, ->18
          5    >   ASSIGN                                                   !4, ~11
   14     6      > FE_RESET_R                                       $13     !3, ->16
          7    > > FE_FETCH_R                                       ~14     $13, !5, ->16
          8    >   ASSIGN                                                   !6, ~14
   15     9        FETCH_DIM_R                                      ~18     !1, !4
         10        FETCH_DIM_R                                      ~19     ~18, !6
         11        ADD                                              ~20     !5, ~19
         12        FETCH_DIM_W                                      $16     !2, !4
         13        ASSIGN_DIM                                               $16, !6
         14        OP_DATA                                                  ~20
   14    15      > JMP                                                      ->7
         16    >   FE_FREE                                                  $13
   13    17      > JMP                                                      ->4
         18    >   FE_FREE                                                  $10
   18    19        INIT_FCALL                                               'var_export'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.7 ms | 1005 KiB | 14 Q