3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.93 ms | 1394 KiB | 15 Q