3v4l.org

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

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.46 ms | 1392 KiB | 13 Q