1
0
mirror of https://github.com/php/php-src.git synced 2026-03-29 11:42:17 +02:00
Files
archived-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