3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public static function whoAmI() { echo 'static::class ', static::class, PHP_EOL; echo 'self::class ', self::class, PHP_EOL; } } class Derived extends Base { } Derived::whoAmI();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uQB1c
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'Derived', 'whoAmI'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Base:
Function whoami:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uQB1c
function name:  whoAmI
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'static%3A%3Aclass+'
          1        FETCH_CLASS_NAME                                 ~0      
          2        ECHO                                                     ~0
          3        ECHO                                                     '%0A'
    8     4        ECHO                                                     'self%3A%3Aclass+'
          5        ECHO                                                     'Base'
          6        ECHO                                                     '%0A'
    9     7      > RETURN                                                   null

End of function whoami

End of class Base.

Class Derived:
Function whoami:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uQB1c
function name:  whoAmI
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'static%3A%3Aclass+'
          1        FETCH_CLASS_NAME                                 ~0      
          2        ECHO                                                     ~0
          3        ECHO                                                     '%0A'
    8     4        ECHO                                                     'self%3A%3Aclass+'
          5        ECHO                                                     'Base'
          6        ECHO                                                     '%0A'
    9     7      > RETURN                                                   null

End of function whoami

End of class Derived.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.18 ms | 999 KiB | 13 Q