1--TEST--
2Closures can be generators
3--FILE--
4<?php
5
6$genFactory = function() {
7    yield 1;
8    yield 2;
9    yield 3;
10};
11
12foreach ($genFactory() as $value) {
13    var_dump($value);
14}
15
16?>
17--EXPECT--
18int(1)
19int(2)
20int(3)
21