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

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

update php

File size: 397 bytes
Line 
1--TEST--
2Bug #72188 (Nested try/finally blocks losing return value)
3--FILE--
4<?php
5function test() {
6    try {
7        return 5;
8    } finally {
9        try {
10            echo 1;
11        } finally {
12            echo 2;
13        }
14    }
15}
16
17
18
19$a = test();
20if($a !== 5) {
21    echo "FAILED: expected 5, received ", var_export($a), PHP_EOL;
22} else {
23    echo "Passed", PHP_EOL;
24}
25?>
26--EXPECT--
2712Passed
Note: See TracBrowser for help on using the repository browser.