php-src/Zend/tests/bug72373.phpt
2016-06-10 15:57:18 +02:00

21 lines
246 B
PHP

--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