php-src/Zend/tests/fe_fetch_dtor_exception.phpt
DanielEScherzer ea297654f4
Zend/*: fix a bunch of typos (GH-16017)
* Zend/*: fix a bunch of typos

* Zend/tests/try/try_catch_finally_005.phpt: update string length
2024-09-24 10:55:21 +02:00

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