xref: /PHP-7.2/Zend/tests/return_types/017.phpt (revision f1d7e3ca)
1--TEST--
2Fully qualified classes in trait return types
3--FILE--
4<?php
5
6namespace FooSpace;
7
8trait Fooable {
9    function foo(): \Iterator {
10        return new \EmptyIterator();
11    }
12}
13
14class Foo {
15    use Fooable;
16}
17
18$foo = new Foo;
19var_dump($foo->foo([]));
20--EXPECTF--
21object(EmptyIterator)#%d (%d) {
22}
23