3v4l.org

run code in 300+ PHP versions simultaneously
<?php $listOfEmployees = array(); $Employee = new StdClass(); $Employee->department = 'foo'; $Employee->name = 'person1'; $listOfEmployees[] = $Employee; $Employee = new StdClass(); $Employee->department = 'foo'; $Employee->name = 'person2'; $listOfEmployees[] = $Employee; $Employee = new StdClass(); $Employee->department = 'bar'; $Employee->name = 'person3'; $listOfEmployees[] = $Employee; $listOfGroupedEmployess = array(); foreach($listOfEmployees as $Employee) { $listOfGroupedEmployess[$Employee->department][] = $Employee; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 36
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 36
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/jFYok
function name:  (null)
number of ops:  38
compiled vars:  !0 = $listOfEmployees, !1 = $Employee, !2 = $listOfGroupedEmployess
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $4      'StdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    5     4        ASSIGN_OBJ                                               !1, 'department'
          5        OP_DATA                                                  'foo'
    6     6        ASSIGN_OBJ                                               !1, 'name'
          7        OP_DATA                                                  'person1'
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  !1
    8    10        NEW                                              $10     'StdClass'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !1, $10
    9    13        ASSIGN_OBJ                                               !1, 'department'
         14        OP_DATA                                                  'foo'
   10    15        ASSIGN_OBJ                                               !1, 'name'
         16        OP_DATA                                                  'person2'
   11    17        ASSIGN_DIM                                               !0
         18        OP_DATA                                                  !1
   12    19        NEW                                              $16     'StdClass'
         20        DO_FCALL                                      0          
         21        ASSIGN                                                   !1, $16
   13    22        ASSIGN_OBJ                                               !1, 'department'
         23        OP_DATA                                                  'bar'
   14    24        ASSIGN_OBJ                                               !1, 'name'
         25        OP_DATA                                                  'person3'
   15    26        ASSIGN_DIM                                               !0
         27        OP_DATA                                                  !1
   17    28        ASSIGN                                                   !2, <array>
   18    29      > FE_RESET_R                                       $23     !0, ->36
         30    > > FE_FETCH_R                                               $23, !1, ->36
   20    31    >   FETCH_OBJ_R                                      ~24     !1, 'department'
         32        FETCH_DIM_W                                      $25     !2, ~24
         33        ASSIGN_DIM                                               $25
         34        OP_DATA                                                  !1
   18    35      > JMP                                                      ->30
         36    >   FE_FREE                                                  $23
   21    37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.5 ms | 1395 KiB | 13 Q