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 = new Second(); $second->doAction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OF6p0
function name:  (null)
number of ops:  6
compiled vars:  !0 = $second
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Second'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'doAction'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class First:
Function doaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OF6p0
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/OF6p0
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:
149.12 ms | 1385 KiB | 13 Q