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

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 490 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            } finally {
12                return 42;
13            }
14        } finally {
15            throw new Exception(2);
16        }
17    }
18}
19
20try {
21    var_dump(test());
22} catch (Exception $e) {
23    do {
24        echo $e->getMessage() . "\n";
25        $e = $e->getPrevious();
26    } while ($e);
27}
28?>
29--EXPECT--
302
311
Note: See TracBrowser for help on using the repository browser.