xref: /PHP-8.0/ext/opcache/tests/bug70207.phpt (revision f8d79582)
1--TEST--
2Bug #70207 Finally is broken with opcache
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7opcache.file_update_protection=0
8--SKIPIF--
9<?php require_once('skipif.inc'); ?>
10--FILE--
11<?php
12function bar() {
13    return "bar";
14}
15function foo() {
16    try { return bar(); }
17    finally {
18        @fopen("non-existent", 'r');
19    }
20}
21
22var_dump(foo());
23?>
24--EXPECT--
25string(3) "bar"
26