1--TEST--
2Adding interface method a object return type during inheritance is allowed
3--FILE--
4<?php
5
6interface One {
7    public function a();
8}
9
10interface Two extends One {
11    public function a() : object;
12}
13
14$three = new class implements Two {
15    public function a() : object {
16        return 12345;
17    }
18};
19$three->a();
20?>
21--EXPECTF--
22Fatal error: Uncaught TypeError: Two@anonymous::a(): Return value must be of type object, int returned in %s:%d
23Stack trace:
24#0 %s(%d): Two@anonymous->a()
25#1 {main}
26  thrown in %s on line 13
27