3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $foo=1; public $bar=2; public $foobar="3"; } $p1="foo"; $p2="bar"; $test=new Test(); echo $test->$p1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7eKsZ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $p1, !1 = $p2, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'foo'
    8     1        ASSIGN                                                   !1, 'bar'
   10     2        NEW                                              $5      'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $5
   12     5        FETCH_OBJ_R                                      ~8      !2, !0
          6        ECHO                                                     ~8
          7      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.49 ms | 1392 KiB | 13 Q