3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { const X = 'C'; } class D extends C { const X = 'D'; public static function parent_x() { return parent::X; } } echo D::parent_x();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Ffju
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'D', 'parent_x'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Class C: [no user functions]
Class D:
Function parent_x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7Ffju
function name:  parent_x
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_CLASS_CONSTANT                             ~0      'X'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function parent_x

End of class D.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.05 ms | 1392 KiB | 13 Q