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->$foo.$bar;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tOhVB
function name:  (null)
number of ops:  9
compiled vars:  !0 = $p1, !1 = $p2, !2 = $test, !3 = $foo, !4 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'foo'
    8     1        ASSIGN                                                   !1, 'bar'
   10     2        NEW                                              $7      'Test'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $7
   12     5        FETCH_OBJ_R                                      ~10     !2, !3
          6        CONCAT                                           ~11     ~10, !4
          7        ECHO                                                     ~11
          8      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.43 ms | 1397 KiB | 13 Q