summaryrefslogtreecommitdiff
path: root/Zend/tests/return_types/016.phpt
blob: cf31d96e6b81c940f6133265f66c970ab60775ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Fully qualified classes are allowed in return types
--FILE--
<?php

namespace Collections;

class Foo {
    function foo(\Iterator $i): \Iterator {
        return $i;
    }
}

$foo = new Foo;
var_dump($foo->foo(new \EmptyIterator()));
--EXPECTF--
object(EmptyIterator)#%d (0) {
}