File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
Zend /
tests /
bug52361.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: Bug #52361 (Throwing an exception in a destructor causes invalid catching)
3: --FILE--
4: <?php
5: class aaa {
6: public function __destruct() {
7: try {
8: throw new Exception(__CLASS__);
9: } catch(Exception $ex) {
10: echo "1. $ex\n";
11: }
12: }
13: }
14: function bbb() {
15: $a = new aaa();
16: throw new Exception(__FUNCTION__);
17: }
18: try {
19: bbb();
20: echo "must be skipped !!!";
21: } catch(Exception $ex) {
22: echo "2. $ex\n";
23: }
24: ?>
25: --EXPECTF--
26: 1. exception 'Exception' with message 'aaa' in %sbug52361.php:5
27: Stack trace:
28: #0 %sbug52361.php(16): aaa->__destruct()
29: #1 %sbug52361.php(16): bbb()
30: #2 {main}
31: 2. exception 'Exception' with message 'bbb' in %sbug52361.php:13
32: Stack trace:
33: #0 %sbug52361.php(16): bbb()
34: #1 {main}
35:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>