3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['foo', 'bar', 'hello', 'world']; $obj = new stdClass; $obj->{$array['foo']}; print_r($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/67kkN
function name:  (null)
number of ops:  11
compiled vars:  !0 = $array, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        NEW                                              $3      'stdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
    7     4        FETCH_DIM_R                                      ~6      !0, 'foo'
          5        FETCH_OBJ_R                                      ~7      !1, ~6
          6        FREE                                                     ~7
    9     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.41 ms | 1394 KiB | 15 Q