3v4l.org

run code in 500+ PHP versions simultaneously
<?php class base { public function click() { $this->innerClick(); } private function innerClick() { echo "Called innerClick from base.\n"; } } class extension extends base { protected function innerClick() { echo "Called innerClick from extension.\n"; } } $example = new extension(); $example->click();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XL6O1
function name:  (null)
number of ops:  6
compiled vars:  !0 = $example
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   24     0  E >   NEW                                                  $1      'extension'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   25     3        INIT_METHOD_CALL                                             !0, 'click'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

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

End of function click

Function innerclick:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XL6O1
function name:  innerClick
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                         'Called+innerClick+from+base.%0A'
   13     1      > RETURN                                                       null

End of function innerclick

End of class base.

Class extension:
Function innerclick:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XL6O1
function name:  innerClick
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                         'Called+innerClick+from+extension.%0A'
   21     1      > RETURN                                                       null

End of function innerclick

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

End of function click

End of class extension.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
141.71 ms | 2269 KiB | 13 Q