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/L9LvI
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/L9LvI
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/L9LvI
function name:  method
number of ops:  3
compiled vars:  !0 = $function
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                  !0
          1        DO_FCALL                                      0          
   10     2      > RETURN                                                   null

End of function method

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.37 ms | 1384 KiB | 13 Q