3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class A {} class B extends A {} class C extends B {} interface InterfaceTest { public function foo(): B; } abstract class AbstractTest { public abstract function foo(): B; } class TestInterfaceCovariance implements InterfaceTest { public function foo(): C {} }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hrOLe
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'testinterfacecovariance'
   16     1      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]
Class C: [no user functions]
Class InterfaceTest:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hrOLe
function name:  foo
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 foo

End of class InterfaceTest.

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

End of function foo

End of class AbstractTest.

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

End of function foo

End of class TestInterfaceCovariance.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.7 ms | 1393 KiB | 13 Q