1--TEST-- 2Valid intersection type variance 3--FILE-- 4<?php 5 6interface X {} 7interface Y {} 8interface Z {} 9 10class TestParent implements X, Y, Z {} 11class TestChild implements Z {} 12 13class A { 14 public X&Y $prop; 15 16 public function method1(X&Y&Z $a): X&Y {} 17 public function method2(X&Y $a): X {} 18} 19class B extends A { 20 public X&Y $prop; 21 22 public function method1(X&Y $a): X&Y&Z {} 23 public function method2(X $a): X&Y {} 24} 25 26?> 27===DONE=== 28--EXPECT-- 29===DONE=== 30