3v4l.org

run code in 300+ PHP versions simultaneously
<?php class First { const CONSTANTA = 1; public static function doAction() { print static::CONSTANTA; } } class Second extends First { const CONSTANTA = 2; } Second::doAction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nmVi8
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'Second', 'doAction'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

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

End of function doaction

End of class First.

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

End of function doaction

End of class Second.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.24 ms | 1393 KiB | 13 Q