xref: /php-src/Zend/tests/return_types/016.phpt (revision 7aacc705)
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?>
17--EXPECTF--
18object(EmptyIterator)#%d (0) {
19}
20