3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function ProcessInput() { $this->Handler(); } public function Handler() { // Some default code or just leave empty echo "Base Hander() is called\n"; } } class Specific extends Base { public function Handler() { echo "Specific Hander() is called\n"; } } $spec = new Specific; $spec->ProcessInput();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YA2d5
function name:  (null)
number of ops:  6
compiled vars:  !0 = $spec
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Specific'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'ProcessInput'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Base:
Function processinput:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YA2d5
function name:  ProcessInput
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_METHOD_CALL                                         'Handler'
          1        DO_FCALL                                      0          
    8     2      > RETURN                                                   null

End of function processinput

Function handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YA2d5
function name:  Handler
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'Base+Hander%28%29+is+called%0A'
   14     1      > RETURN                                                   null

End of function handler

End of class Base.

Class Specific:
Function handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YA2d5
function name:  Handler
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'Specific+Hander%28%29+is+called%0A'
   22     1      > RETURN                                                   null

End of function handler

Function processinput:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YA2d5
function name:  ProcessInput
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_METHOD_CALL                                         'Handler'
          1        DO_FCALL                                      0          
    8     2      > RETURN                                                   null

End of function processinput

End of class Specific.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.03 ms | 1067 KiB | 13 Q