3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpversion() >= "7.0.0" or die(); $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’ $bar->$foo[0] = 42; // zeroth element of array that $foo identifies = 42 var_dump($bar);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsQ4M
function name:  (null)
number of ops:  22
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'phpversion'
          1        DO_ICALL                                         $2      
          2        IS_SMALLER_OR_EQUAL                              ~3      '7.0.0', $2
          3      > JMPNZ_EX                                         ~3      ~3, ->6
          4    > > EXIT                                                     
          5*       BOOL                                             ~3      <true>
    3     6    >   ASSIGN                                                   !0, 'foo'
    4     7        NEW                                              $5      'stdClass'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $5
    5    10        ASSIGN_OBJ                                               !1, !0
         11        OP_DATA                                                  <array>
    7    12        FETCH_DIM_R                                      ~9      !0, 0
         13        ASSIGN_OBJ                                               !1, ~9
         14        OP_DATA                                                  42
    8    15        FETCH_OBJ_W                                      $11     !1, !0
         16        ASSIGN_DIM                                               $11, 0
         17        OP_DATA                                                  42
   10    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.61 ms | 1395 KiB | 17 Q