summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/017.phpt
blob: d44b26fc042707ee75dbff1d0d111f23b6c4de02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Fully qualified classes in trait return types

--FILE--
<?php

namespace FooSpace;

trait Fooable {
    function foo(): \Iterator {
        return new \EmptyIterator();
    }
}

class Foo {
    use Fooable;
}

$foo = new Foo;
var_dump($foo->foo([]));

--EXPECTF--
object(EmptyIterator)#%d (%d) {
}