php-src/Zend/tests/bind_static_exception.phpt
2021-09-29 10:17:05 +02:00

19 lines
293 B
PHP

--TEST--
BIND_STATIC may destroy a variable with a throwing destructor
--FILE--
<?php
class Test {
function __destruct() {
throw new Exception("Foo");
}
}
try {
$new = new Test;
static $new;
} catch (Exception $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Foo