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

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

update php

File size: 275 bytes
Line 
1--TEST--
2Bug #70228 (memleak if return in finally block)
3--FILE--
4<?php
5function test($x) {
6    foreach ($x as $v) {
7        try {
8            return str_repeat("a", 2);
9        } finally {
10            return 42;
11        }
12    }
13}
14
15var_dump(test([1]));
16?>
17--EXPECT--
18int(42)
Note: See TracBrowser for help on using the repository browser.