mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
ea297654f4
* Zend/*: fix a bunch of typos * Zend/tests/try/try_catch_finally_005.phpt: update string length
23 lines
310 B
PHP
23 lines
310 B
PHP
--TEST--
|
|
Dtor may throw exception during FE_FETCH assignment
|
|
--FILE--
|
|
<?php
|
|
|
|
$v = new class {
|
|
function __destruct() {
|
|
throw new Exception("foo");
|
|
}
|
|
};
|
|
|
|
try {
|
|
foreach ([1, 2] as $v) {
|
|
var_dump($v);
|
|
}
|
|
} catch (Exception $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
foo
|