source: src/router/php7/Zend/tests/try/bug70228_4.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 568 bytes
Line 
1--TEST--
2Bug #70228 (memleak if return in finally block)
3--FILE--
4<?php
5function test() {
6    try {
7        throw new Exception(1);
8    } finally {
9        try {
10            try {
11                try {
12                } finally {
13                    return 42;
14                }
15            } finally {
16                throw new Exception(3);
17            }
18        } catch (Exception $e) {}
19    }
20}
21
22try {
23    var_dump(test());
24} catch (Exception $e) {
25    do {
26        echo $e->getMessage() . "\n";
27        $e = $e->getPrevious();
28    } while ($e);
29}
30?>
31--EXPECT--
321
Note: See TracBrowser for help on using the repository browser.