3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public static function myStaticFunc() { var_dump(__METHOD__); } } function call(callable $func) { $func(); } $callFunction = 'call'; $callFunction('myclass::myStaticFunc'); $callFunction = 'myclass::myStaticFunc'; $callFunction(); $callFunction = 'myclass::unkownFunc'; $callFunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W8hQA
function name:  (null)
number of ops:  11
compiled vars:  !0 = $callFunction
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 'call'
   14     1        INIT_DYNAMIC_CALL                                        !0
          2        SEND_VAL_EX                                              'myclass%3A%3AmyStaticFunc'
          3        DO_FCALL                                      0          
   16     4        ASSIGN                                                   !0, 'myclass%3A%3AmyStaticFunc'
   17     5        INIT_DYNAMIC_CALL                                        !0
          6        DO_FCALL                                      0          
   19     7        ASSIGN                                                   !0, 'myclass%3A%3AunkownFunc'
   20     8        INIT_DYNAMIC_CALL                                        !0
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W8hQA
function name:  call
number of ops:  4
compiled vars:  !0 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_DYNAMIC_CALL                                        !0
          2        DO_FCALL                                      0          
   11     3      > RETURN                                                   null

End of function call

Class MyClass:
Function mystaticfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W8hQA
function name:  myStaticFunc
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'MyClass%3A%3AmyStaticFunc'
          2        DO_ICALL                                                 
    6     3      > RETURN                                                   null

End of function mystaticfunc

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.87 ms | 1445 KiB | 14 Q