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/U8jh9
function name:  (null)
number of ops:  10
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_R                      local               ~8      !2
          6        FETCH_OBJ_R                                      ~9      ~8, !0
          7        FETCH_DIM_R                                      ~10     ~9, 0
          8        ECHO                                                     ~10
    9     9      > RETURN                                                   1

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.65 ms | 1392 KiB | 13 Q