summaryrefslogtreecommitdiff
path: root/Zend/tests/generators/yield_during_function_call.phpt
blob: 21071f9fb4af67c3e3cb0d72126c5890fdaa9a21 (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"