summaryrefslogtreecommitdiff
path: root/Zend/tests/generators/yield_during_function_call.phpt
blob: 9960e6d92b9c1013feb6d964f35f82a6824a87af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
"yield" can occur during a function call
--FILE--
<?php

function gen() {
    var_dump(str_repeat("x", yield));
}

$gen = gen();
$gen->send(10);

?>
--EXPECT--
string(10) "xxxxxxxxxx"