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