mirror of
https://github.com/php/php-src.git
synced 2024-12-22 00:10:16 +08:00
c136afa2be
Only applying this for 7.2, because handling this would be ugly under the old retval freeing semantics.
23 lines
310 B
PHP
23 lines
310 B
PHP
--TEST--
|
|
Dtor may throw exception furing 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
|