summaryrefslogtreecommitdiff
path: root/Zend/tests/bug68775.phpt
blob: ce0eaedf5333e820ee00bbd679347b3b332ee6d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--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)