3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.35 ms | 1400 KiB | 15 Q