3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { static $function; static function method() { ${self::$function}(); } } function callback() {} Example::$function = 'callback'; Example::method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C9MmD
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ASSIGN_STATIC_PROP                                       'function', 'Example'
          1        OP_DATA                                                  'callback'
   16     2        INIT_STATIC_METHOD_CALL                                  'Example', 'method'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

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

End of function callback

Class Example:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C9MmD
function name:  method
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'function'
          1        FETCH_R                      local               ~1      ~0
          2        INIT_DYNAMIC_CALL                                        ~1
          3        DO_FCALL                                      0          
   10     4      > RETURN                                                   null

End of function method

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.73 ms | 1385 KiB | 13 Q