3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface AAA{ function method($x); } interface BBB extends AAA{ function method($x, $y = null); } // this works correctly: class AA_ implements AAA{ function method($x){} } class BB_ extends AA_ implements BBB{ function method($x, $y = null){} } (new BB_())->method(1, 1); // this doesn't: abstract class AAA_ implements AAA{} abstract class BBB_ extends AAA_ implements BBB{} // AAA::method is checked to be compatible against BBB::method, // while it should happen the opposite
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKFbZ
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                                'bbb'
   12     1        DECLARE_CLASS                                                'aa_'
   15     2        DECLARE_CLASS                                                'bb_', 'aa_'
   18     3        NEW                                                  $0      'BB_'
          4        DO_FCALL                                          0          
          5        INIT_METHOD_CALL                                             $0, 'method'
          6        SEND_VAL_EX                                                  1
          7        SEND_VAL_EX                                                  1
          8        DO_FCALL                                          0          
   21     9        DECLARE_CLASS                                                'aaa_'
   22    10        DECLARE_CLASS                                                'bbb_', 'aaa_'
   24    11      > RETURN                                                       1

Class AAA:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKFbZ
function name:  method
number of ops:  2
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function method

End of class AAA.

Class BBB:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKFbZ
function name:  method
number of ops:  3
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      null
          2      > RETURN                                                       null

End of function method

End of class BBB.

Class AA_:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKFbZ
function name:  method
number of ops:  2
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
          1      > RETURN                                                       null

End of function method

End of class AA_.

Class BB_:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LKFbZ
function name:  method
number of ops:  3
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      null
          2      > RETURN                                                       null

End of function method

End of class BB_.

Class AAA_: [no user functions]
Class BBB_: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
224.81 ms | 2905 KiB | 13 Q