3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface baseinterface {} class base implements baseinterface { function test(): baseinterface {} } class extended extends base { function test(): extended {} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7kurh
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                                'base'
    8     1        DECLARE_CLASS                                                'extended', 'base'
   10     2      > RETURN                                                       1

Class baseinterface: [no user functions]
Class base:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7kurh
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   VERIFY_RETURN_TYPE                                           
          1      > RETURN                                                       null

End of function test

End of class base.

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

End of function test

End of class extended.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
146.33 ms | 3331 KiB | 12 Q