3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = [["a"], ["b"], ["c"], ["d"], ["e"]]; $arr2 = [1,2]; $count = count($arr2); foreach ($arr1 as $i => [1 => &$v]) { $v = $arr2[$i % $count]; } var_export($arr1);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 126) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/goG37
function name:  (null)
number of ops:  20
compiled vars:  !0 = $arr1, !1 = $arr2, !2 = $count, !3 = $v, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        COUNT                                            ~7      !1
          3        ASSIGN                                                   !2, ~7
    7     4      > FE_RESET_RW                                      $9      !0, ->15
          5    > > FE_FETCH_RW                                      ~14     $9, $10, ->15
          6    >   FETCH_LIST_W                                     $11     $10, 1
          7        MAKE_REF                                         $12     $11
          8        ASSIGN_REF                                               !3, $12
          9        FREE                                                     $10
         10        ASSIGN                                                   !4, ~14
    8    11        MOD                                              ~16     !4, !2
         12        FETCH_DIM_R                                      ~17     !1, ~16
         13        ASSIGN                                                   !3, ~17
    7    14      > JMP                                                      ->5
         15    >   FE_FREE                                                  $9
   10    16        INIT_FCALL                                               'var_export'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.64 ms | 1010 KiB | 14 Q