1--TEST--
2Return type mismatch; implements interface
3--FILE--
4<?php
5
6interface A {
7    function foo(): A;
8}
9
10class B implements A {
11    function foo(): stdClass {}
12}
13?>
14--EXPECTF--
15Fatal error: Declaration of B::foo(): stdClass must be compatible with A::foo(): A in %s on line %d
16