xref: /php-src/ext/zend_test/tests/gh10695_1.phpt (revision b3e33be4)
1--TEST--
2GH-10695: Exceptions in resource dtors during shutdown are caught
3--EXTENSIONS--
4zend_test
5--FILE--
6<?php
7set_exception_handler(function (\Throwable $exception) {
8    echo 'Caught: ' . $exception->getMessage() . "\n";
9});
10
11$resource = zend_test_create_throwing_resource();
12?>
13--EXPECT--
14Caught: Throwing resource destructor called
15