3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Standalone { public function nonstatic(){} } class Base { public function doSomething() {} } class Vendor extends Base { public function doSomething() { // do something.. // call parent (Base::doSomething()) parent::doSomething(); // do something more } } class Local extends Vendor { public function doSomething() { // do something // intention: call grand-parent (Base::doSomething()) Base::doSomething(); // this will call Vendor::doSomething() :( // do something more } } Standalone::nonstatic();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSN1K
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   INIT_STATIC_METHOD_CALL                                  'Standalone', 'nonstatic'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Standalone:
Function nonstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSN1K
function name:  nonstatic
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function nonstatic

End of class Standalone.

Class Base:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSN1K
function name:  doSomething
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   null

End of function dosomething

End of class Base.

Class Vendor:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSN1K
function name:  doSomething
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'doSomething'
          1        DO_FCALL                                      0          
   25     2      > RETURN                                                   null

End of function dosomething

End of class Vendor.

Class Local:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KSN1K
function name:  doSomething
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   INIT_STATIC_METHOD_CALL                                  'Base', 'doSomething'
          1        DO_FCALL                                      0          
   39     2      > RETURN                                                   null

End of function dosomething

End of class Local.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.72 ms | 1395 KiB | 13 Q