1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 19:41:05 +02:00
Files
archived-php-src/Zend/tests/try/try_finally_016.phpt
Fabien Villepinte a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00

38 lines
558 B
PHP

--TEST--
Exception during break 2
--FILE--
<?php
class A {
public $a = 1;
public $b = 2;
public function __destruct() {
throw new Exception;
}
}
function foo() {
foreach ([0] as $_) {
foreach (new A as $value) {
try {
break 2;
} catch (Exception $e) {
echo "catch\n";
} finally {
echo "finally\n";
}
}
}
}
try {
foo();
} catch (Exception $e) {
echo "outer catch\n";
}
?>
--EXPECT--
finally
outer catch