3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj1 = new stdClass(); $obj1->test = 'hoi'; $arr = [$obj1]; foreach ($arr as $obj) { $obj->test = 'doeii!!'; } var_dump($obj1);
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
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/1JV3v
function name:  (null)
number of ops:  17
compiled vars:  !0 = $obj1, !1 = $arr, !2 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN_OBJ                                               !0, 'test'
          4        OP_DATA                                                  'hoi'
    6     5        INIT_ARRAY                                       ~7      !0
          6        ASSIGN                                                   !1, ~7
    8     7      > FE_RESET_R                                       $9      !1, ->12
          8    > > FE_FETCH_R                                               $9, !2, ->12
    9     9    >   ASSIGN_OBJ                                               !2, 'test'
         10        OP_DATA                                                  'doeii%21%21'
    8    11      > JMP                                                      ->8
         12    >   FE_FREE                                                  $9
   12    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.99 ms | 1395 KiB | 15 Q