3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { const C = self::C; function c() { echo static::C; } } class B extends A { const C = 'PHP'; } (new B)->c();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HUCTh
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   NEW                                                  $0      'B'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'c'
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

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

End of function c

End of class A.

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

End of function c

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
422.1 ms | 2153 KiB | 13 Q