mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
fc6f53d426
A curious exception handling pattern found in Symfony's HttpClient.
21 lines
314 B
PHP
21 lines
314 B
PHP
--TEST--
|
|
Leak when setting recursive previous exception in finally handling
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
try {
|
|
throw new Exception("Test");
|
|
} catch (Exception $e) {
|
|
throw $e;
|
|
} finally {
|
|
throw $e;
|
|
}
|
|
} catch (Exception $e2) {
|
|
echo $e2->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Test
|