3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'foo'; $bar = new stdClass; $bar->$foo = array(10,20,30); var_dump($bar->$foo); $bar->{$foo[0]} = 42; $bar->$foo[0] = 42; var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2LPi4
function name:  (null)
number of ops:  20
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
    4     1        NEW                                              $3      'stdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
    5     4        ASSIGN_OBJ                                               !1, !0
          5        OP_DATA                                                  <array>
    7     6        INIT_FCALL                                               'var_dump'
          7        FETCH_OBJ_R                                      ~7      !1, !0
          8        SEND_VAL                                                 ~7
          9        DO_ICALL                                                 
    9    10        FETCH_DIM_R                                      ~9      !0, 0
         11        ASSIGN_OBJ                                               !1, ~9
         12        OP_DATA                                                  42
   10    13        FETCH_OBJ_W                                      $11     !1, !0
         14        ASSIGN_DIM                                               $11, 0
         15        OP_DATA                                                  42
   12    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.32 ms | 1394 KiB | 15 Q