1--TEST--
2Co-variance check failure for intersection type where child removes one of intersection type members
3--FILE--
4<?php
5
6interface A {}
7interface B {}
8interface C {}
9
10class Test implements A, B, C {}
11
12class Foo {
13    public function foo(): A&B&C {
14        return new Test();
15    }
16}
17
18/* This fails because just A&B larger than A&B&C */
19class FooChild extends Foo {
20    public function foo(): A&B {
21        return new Test();
22    }
23}
24
25?>
26--EXPECTF--
27Fatal error: Declaration of FooChild::foo(): A&B must be compatible with Foo::foo(): A&B&C in %s on line %d
28