3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { function test1(){ return 'Test1'; } public $t2 = 'pi'; } $t = new Test(); $t1 = 'test1'; echo 't1=' . $t->$t1() . PHP_EOL; echo 't2=' . $t->$t2() . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hHpCX
function name:  (null)
number of ops:  15
compiled vars:  !0 = $t, !1 = $t1, !2 = $t2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   12     3        ASSIGN                                                   !1, 'test1'
   13     4        INIT_METHOD_CALL                                         !0, !1
          5        DO_FCALL                                      0  $7      
          6        CONCAT                                           ~8      't1%3D', $7
          7        CONCAT                                           ~9      ~8, '%0A'
          8        ECHO                                                     ~9
   14     9        INIT_METHOD_CALL                                         !0, !2
         10        DO_FCALL                                      0  $10     
         11        CONCAT                                           ~11     't2%3D', $10
         12        CONCAT                                           ~12     ~11, '%0A'
         13        ECHO                                                     ~12
         14      > RETURN                                                   1

Class Test:
Function test1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hHpCX
function name:  test1
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   'Test1'
    6     1*     > RETURN                                                   null

End of function test1

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.02 ms | 1393 KiB | 13 Q