3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass(); $obj->bar = "xyz"; $data = array("foo" => "bar"); $key = "foo"; echo $obj->$data[$key]; echo "{$obj->{$data[$key]}}";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gdZie
function name:  (null)
number of ops:  15
compiled vars:  !0 = $obj, !1 = $data, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        ASSIGN_OBJ                                               !0, 'bar'
          4        OP_DATA                                                  'xyz'
    5     5        ASSIGN                                                   !1, <array>
    6     6        ASSIGN                                                   !2, 'foo'
    7     7        FETCH_OBJ_R                                      ~9      !0, !1
          8        FETCH_DIM_R                                      ~10     ~9, !2
          9        ECHO                                                     ~10
    8    10        FETCH_DIM_R                                      ~11     !1, !2
         11        FETCH_OBJ_R                                      ~12     !0, ~11
         12        CAST                                          6  ~13     ~12
         13        ECHO                                                     ~13
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.31 ms | 1393 KiB | 13 Q