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

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

update php

File size: 527 bytes
Line 
1--TEST--
2Bug #70228 (memleak if return in finally block)
3--FILE--
4<?php
5
6function foo() {
7    $array = [1, 2, $n = 3];
8    foreach ($array as $value) {
9        var_dump($value);
10        try {
11            try {
12                switch (str_repeat("b", 2)) {
13                        case "bb":
14                            return str_repeat("a", 2);
15                }
16            } finally {
17                throw new Exception;
18            }
19        } catch (Exception $e) { }
20    }
21}
22
23foo();
24?>
25===DONE===
26--EXPECT--
27int(1)
28int(2)
29int(3)
30===DONE===
Note: See TracBrowser for help on using the repository browser.