mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
75a04eac97
exit() is now internally implemented by throwing an exception, performing a normal stack unwind and a clean shutdown. This ensures that no persistent resource leaks occur. The exception is internal, cannot be caught and does not result in the execution of finally blocks. This may be relaxed in the future. Closes GH-5768.
20 lines
265 B
PHP
20 lines
265 B
PHP
--TEST--
|
|
exit() and finally (1)
|
|
--FILE--
|
|
<?php
|
|
|
|
// TODO: In the future, we should execute the finally block.
|
|
|
|
try {
|
|
exit("Exit\n");
|
|
} catch (Throwable $e) {
|
|
echo "Not caught\n";
|
|
} finally {
|
|
echo "Finally\n";
|
|
}
|
|
echo "Not executed\n";
|
|
|
|
?>
|
|
--EXPECT--
|
|
Exit
|