3v4l.org

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

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

End of function world

End of class hello.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.01 ms | 1393 KiB | 13 Q