1--TEST-- 2Covariant replacement of iterable type with unregistered intersection type in DNF type 3--FILE-- 4<?php 5 6class Test { 7 function method1(): iterable|string {} 8 function method2(): iterable|int {} 9} 10class Test2 extends Test { 11 function method1(): (X&Traversable)|string {} 12 function method2(): int|(X&MyIterator) {} 13} 14 15?> 16===DONE=== 17--EXPECTF-- 18Fatal error: Could not check compatibility between Test2::method2(): (X&MyIterator)|int and Test::method2(): Traversable|array|int, because class X is not available in %s 19