3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ 2 => [130, 28, 1, 1, 6], 3 => [52, 2, 3, 3, 27], 13 => [41, 20, 27, 13, 37] ]; $array2 = [89, 99, 109]; $counter = 0; foreach ($array1 as $index => $subArray) { $array1[$index][] = $array2[$counter++]; } print_r($array1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/4k7hS
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array1, !1 = $array2, !2 = $counter, !3 = $subArray, !4 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   10     2        ASSIGN                                                   !2, 0
   11     3      > FE_RESET_R                                       $8      !0, ->12
          4    > > FE_FETCH_R                                       ~9      $8, !3, ->12
          5    >   ASSIGN                                                   !4, ~9
   12     6        POST_INC                                         ~13     !2
          7        FETCH_DIM_R                                      ~14     !1, ~13
          8        FETCH_DIM_W                                      $11     !0, !4
          9        ASSIGN_DIM                                               $11
         10        OP_DATA                                                  ~14
   11    11      > JMP                                                      ->4
         12    >   FE_FREE                                                  $8
   15    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.14 ms | 1001 KiB | 14 Q