xref: /php-src/Zend/tests/generators/bug75396.phpt (revision 420d11e8)
1--TEST--
2Bug #75396: Exit inside generator finally results in fatal error
3--FILE--
4<?php
5
6$gen = (function () {
7    yield 42;
8
9    try {
10        echo "Try\n";
11        exit("Exit\n");
12    } finally {
13        echo "Finally\n";
14    }
15})();
16
17$gen->send("x");
18
19?>
20--EXPECT--
21Try
22Exit
23