3v4l.org

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

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.32 ms | 1384 KiB | 13 Q