mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
20 lines
216 B
PHP
20 lines
216 B
PHP
--TEST--
|
|
Bug #68775: yield in a function argument crashes or loops indefinitely
|
|
--FILE--
|
|
<?php
|
|
|
|
function a($x) {
|
|
var_dump($x);
|
|
}
|
|
|
|
function gen() {
|
|
a(yield);
|
|
}
|
|
|
|
$g = gen();
|
|
$g->send(1);
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|