mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
2ae21abdf7
Squashed commit of the following: commit8461b0407f
Author: Dmitry Stogov <dmitry@zend.com> Date: Wed May 25 00:34:42 2016 +0300 Rmoved zend_try_catch_element.parent and walk through op_array.try_catch_array backward from the current try_cacth_offset. commit0c71e24964
Author: Dmitry Stogov <dmitry@zend.com> Date: Wed May 25 00:04:53 2016 +0300 Move SAVE_OPLINE() to its original place commit111432a4df
Author: Dmitry Stogov <dmitry@zend.com> Date: Wed May 25 00:01:10 2016 +0300 Separate the common part of ZEND_HANDLE_EXCEPTION and FAST_RET into zend_dispatch_try_catch_finally_helper. commit4f21c06c2e
Author: Nikita Popov <nikic@php.net> Date: Tue May 24 14:55:27 2016 +0200 Improve finally fix commitda5c727499
Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 24 10:36:08 2016 +0300 Fixed Zend/tests/try/bug70228_3.phpt and Zend/tests/try/bug70228_4.phpt commitcfcedf2fb4
Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 24 02:59:27 2016 +0300 Added test commit4c6aa93d43
Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 24 00:38:20 2016 +0300 Added tests commit8a8f4704b0
Author: Dmitry Stogov <dmitry@zend.com> Date: Mon May 23 23:27:34 2016 +0300 Fixed bug #72213 (Finally leaks on nested exceptions)
39 lines
633 B
PHP
39 lines
633 B
PHP
--TEST--
|
|
Exception in finally inside finally following try/catch containing throwing try/finally
|
|
--FILE--
|
|
<?php
|
|
|
|
function test() {
|
|
try {
|
|
throw new Exception(1);
|
|
} finally {
|
|
try {
|
|
try {
|
|
} finally {
|
|
throw new Exception(2);
|
|
}
|
|
} catch (Exception $e) {}
|
|
try {
|
|
} finally {
|
|
throw new Exception(3);
|
|
}
|
|
}
|
|
}
|
|
|
|
try {
|
|
test();
|
|
} catch (Exception $e) {
|
|
echo $e, "\n";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Exception: 1 in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): test()
|
|
#1 {main}
|
|
|
|
Next Exception: 3 in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): test()
|
|
#1 {main}
|