1--TEST--
2Generators work properly in MultipleIterator
3--FILE--
4<?php
5
6function gen1() {
7    yield 'a';
8    yield 'aa';
9}
10
11function gen2() {
12    yield 'b';
13    yield 'bb';
14}
15
16$it = new MultipleIterator;
17$it->attachIterator(gen1());
18$it->attachIterator(gen2());
19
20foreach ($it as $values) {
21    var_dump($values);
22}
23
24?>
25--EXPECT--
26array(2) {
27  [0]=>
28  string(1) "a"
29  [1]=>
30  string(1) "b"
31}
32array(2) {
33  [0]=>
34  string(2) "aa"
35  [1]=>
36  string(2) "bb"
37}
38