1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00
Files
archived-php-src/Zend/tests/try/try_finally_016.phpt
2015-08-04 07:42:28 +03:00

40 lines
580 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";
}
?>
===DONE===
--EXPECT--
finally
outer catch
===DONE===