1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-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