php-src/Zend/tests/generators/aborted_yield_during_switch.phpt
Nikita Popov ea5c66ec93 Avoid op_num = -1 in unfinished generator cleanup
Also add two tests showing that the -1 substraction in the
computation of op_num is really necessary.
2015-06-23 20:17:30 +02:00

20 lines
209 B
PHP

--TEST--
Aborted yield during switch
--FILE--
<?php
function gen($x) {
switch ($x."y") {
default:
yield;
}
}
$gen = gen("x");
$gen->rewind();
?>
===DONE===
--EXPECT--
===DONE===