3v4l.org

run code in 300+ PHP versions simultaneously
<?php $objects = array( new StdClass, new StdClass ); foreach ($objects as $obj) { $obj->var = true; } var_dump($objects); $arrays = array( array(), array() ); foreach ($arrays as $arr) { $arr['var'] = true; } var_dump($arrays);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 12
filename:       /in/akj12
function name:  (null)
number of ops:  27
compiled vars:  !0 = $objects, !1 = $obj, !2 = $arrays, !3 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'StdClass'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~6      $4
          3        NEW                                              $7      'StdClass'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~6      $7
    2     6        ASSIGN                                                   !0, ~6
    5     7      > FE_RESET_R                                       $10     !0, ->12
          8    > > FE_FETCH_R                                               $10, !1, ->12
    6     9    >   ASSIGN_OBJ                                               !1, 'var'
         10        OP_DATA                                                  <true>
    5    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $10
    8    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
   10    16        ASSIGN                                                   !2, <array>
   13    17      > FE_RESET_R                                       $14     !2, ->22
         18    > > FE_FETCH_R                                               $14, !3, ->22
   14    19    >   ASSIGN_DIM                                               !3, 'var'
         20        OP_DATA                                                  <true>
   13    21      > JMP                                                      ->18
         22    >   FE_FREE                                                  $14
   16    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.69 ms | 1396 KiB | 15 Q