3v4l.org

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

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

End of function d

End of class a.

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

End of function d

End of class b.

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

End of function d

End of class c.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.37 ms | 1392 KiB | 15 Q