1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 03:22:58 +02:00
Files
archived-php-src/Zend/tests/try/bug71604.phpt
Nikita Popov 921b3251b3 Fix bug #71604
Alternatively could throw some kind of uncatchable dummy exception
into the generator. Right now just checking for NULL in two places
seems simpler.
2016-05-28 14:40:32 +02:00

26 lines
376 B
PHP

--TEST--
Bug #71604: Aborted Generators continue after nested finally
--FILE--
<?php
function gen() {
try {
try {
yield;
} finally {
print "INNER\n";
}
} catch (Exception $e) {
print "EX\n";
} finally {
print "OUTER\n";
}
print "NOTREACHED\n";
}
gen()->current();
?>
--EXPECT--
INNER
OUTER