3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class A{ const NAME=null; static function f(){ return static::NAME; } } class B extends A{ const NAME='B'; } B::f(); abstract class A{ const NAME=null; static function f(){ return static::NAME; } } class B extends A{ const NAME='B'; } B::f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6dd8Q
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'f'
          1        DO_FCALL                                      0          
   16     2        DECLARE_CLASS                                            'a'
   24     3        DECLARE_CLASS                                            'b', 'a'
   28     4        INIT_STATIC_METHOD_CALL                                  'B', 'f'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function f

End of class A.

Class B:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6dd8Q
function name:  f
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_CLASS_CONSTANT                             ~0      'NAME'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function f

End of class B.

Class A:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6dd8Q
function name:  f
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   FETCH_CLASS_CONSTANT                             ~0      'NAME'
          1      > RETURN                                                   ~0
   21     2*     > RETURN                                                   null

End of function f

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.27 ms | 1007 KiB | 13 Q