blob: 5b979a3b67fa7ca8477eb8c8f686c95d0bce0ce7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--TEST--
Return value fails inheritance check in method
--FILE--
<?php
class foo {}
class qux {
public function foo() : foo {
return $this;
}
}
$qux = new qux();
$qux->foo();
--EXPECTF--
Catchable fatal error: Return value of qux::foo() must be an instance of foo, instance of qux returned in %s on line %d
|