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

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

update php

File size: 308 bytes
Line 
1--TEST--
2Bug #70228 (memleak if return hidden by throw in finally block)
3--FILE--
4<?php
5function test() {
6    try {
7        return str_repeat("a", 2);
8    } finally {
9        throw new Exception("ops");
10    }
11}
12
13try {
14    test();
15} catch (Exception $e) {
16    echo $e->getMessage(), "\n";
17}
18?>
19--EXPECT--
20ops
Note: See TracBrowser for help on using the repository browser.