yield_closure.phpt   [plain text]


--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!