1--TEST-- 2Fully qualified classes are allowed in return types 3--FILE-- 4<?php 5 6namespace Collections; 7 8class Foo { 9 function foo(\Iterator $i): \Iterator { 10 return $i; 11 } 12} 13 14$foo = new Foo; 15var_dump($foo->foo(new \EmptyIterator())); 16--EXPECTF-- 17object(EmptyIterator)#%d (0) { 18} 19