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