3v4l.org

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

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

End of function f

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.28 ms | 1393 KiB | 13 Q