summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72373.phpt
blob: 67377c5ba71ba0ed3a142fbf038f7f478b8f0835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #72373: TypeError after Generator function w/declared return type finishes
--FILE--
<?php

function foo() : Generator {
    yield 1;
    yield 2;
    yield 3;
}

foreach (foo() as $bar) {
    echo $bar . "\n";
}

?>
--EXPECT--
1
2
3