3v4l.org

run code in 300+ PHP versions simultaneously
<?php $staticArray = ['group_1', 'group_2']; foreach ($staticArray as $name){ $names[] = $name; } $staticArray2 = ['one', 'two']; $i = 0; foreach ($staticArray2 as $name){ $item['group']['name'] = $names[$i]; $item['group']['user_1'] = 'Peter'; $item['group']['user_2'] = 'Jack'; $groups[] = $item; $i++; } print_r($groups);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 25
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 6
filename:       /in/GUo7K
function name:  (null)
number of ops:  30
compiled vars:  !0 = $staticArray, !1 = $name, !2 = $names, !3 = $staticArray2, !4 = $i, !5 = $item, !6 = $groups
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > FE_RESET_R                                       $8      !0, ->6
          2    > > FE_FETCH_R                                               $8, !1, ->6
    6     3    >   ASSIGN_DIM                                               !2
          4        OP_DATA                                                  !1
    5     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $8
    9     7        ASSIGN                                                   !3, <array>
   11     8        ASSIGN                                                   !4, 0
   12     9      > FE_RESET_R                                       $12     !3, ->25
         10    > > FE_FETCH_R                                               $12, !1, ->25
   14    11    >   FETCH_DIM_R                                      ~15     !2, !4
         12        FETCH_DIM_W                                      $13     !5, 'group'
         13        ASSIGN_DIM                                               $13, 'name'
         14        OP_DATA                                                  ~15
   15    15        FETCH_DIM_W                                      $16     !5, 'group'
         16        ASSIGN_DIM                                               $16, 'user_1'
         17        OP_DATA                                                  'Peter'
   16    18        FETCH_DIM_W                                      $18     !5, 'group'
         19        ASSIGN_DIM                                               $18, 'user_2'
         20        OP_DATA                                                  'Jack'
   18    21        ASSIGN_DIM                                               !6
         22        OP_DATA                                                  !5
   20    23        PRE_INC                                                  !4
   12    24      > JMP                                                      ->10
         25    >   FE_FREE                                                  $12
   23    26        INIT_FCALL                                               'print_r'
         27        SEND_VAR                                                 !6
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.51 ms | 999 KiB | 14 Q