1--TEST--
2It's possible to invoke a generator dynamically
3--FILE--
4<?php
5
6function gen($foo, $bar) {
7 yield $foo;
8 yield $bar;
9}
10
11$gen = call_user_func('gen', 'bar', 'foo');
12foreach ($gen as $value) {
13 var_dump($value);
14}
15
16?>
17--EXPECT--
18string(3) "bar"
19string(3) "foo"
20