3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myclass { static function say_hello() { echo "Hello!\n"; } } $classname = "myclass"; call_user_func(array('myclass', 'say_hello')); call_user_func(array($classname, 'say_hello')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NDA0Q
function name:  (null)
number of ops:  8
compiled vars:  !0 = $classname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'myclass'
   12     1        INIT_USER_CALL                                0          'call_user_func', <array>
          2        DO_FCALL                                      0          
   13     3        INIT_ARRAY                                       ~3      !0
          4        ADD_ARRAY_ELEMENT                                ~3      'say_hello'
          5        INIT_USER_CALL                                0          'call_user_func', ~3
          6        DO_FCALL                                      0          
   15     7      > RETURN                                                   1

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

End of function say_hello

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.46 ms | 1384 KiB | 13 Q