3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = 'bar'; $foo = (object)array('bar' => 'rab'); var_dump( $foo->{$key} ); var_dump( $foo->$key ); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N7EoG
function name:  (null)
number of ops:  12
compiled vars:  !0 = $key, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'bar'
    4     1        CAST                                          8  ~3      <array>
          2        ASSIGN                                                   !1, ~3
    6     3        INIT_FCALL                                               'var_dump'
          4        FETCH_OBJ_R                                      ~5      !1, !0
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                                 
    8     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~7      !1, !0
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
    9    11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.84 ms | 941 KiB | 16 Q