summaryrefslogtreecommitdiff
path: root/Zend/tests/generators/yield_closure.phpt
blob: e380b299461a3be169b27df0e999a92615781791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Generator shouldn't crash if last yielded value is a closure
--FILE--
<?php

function gen() {
    yield function() {};
}

$gen = gen();
$gen->next();

echo "Done!";

?>
--EXPECT--
Done!