3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ static function aa() { var_dump(static::class); var_dump(self::class); } } class B extends A { } B::aa(); echo "---"; A::aa();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K8lNI
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'aa'
          1        DO_FCALL                                      0          
   16     2        ECHO                                                     '---'
   17     3        INIT_STATIC_METHOD_CALL                                  'A', 'aa'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function aa

End of class A.

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

End of function aa

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.63 ms | 1395 KiB | 15 Q