xref: /PHP-8.1/Zend/tests/bug64135.phpt (revision 7aacc705)
1--TEST--
2Bug #64135 (Exceptions from set_error_handler are not always propagated)
3--FILE--
4<?php
5
6function exception_error_handler() {
7        throw new Exception();
8}
9
10set_error_handler("exception_error_handler");
11try {
12   $undefined->undefined();
13} catch(Throwable $e) {
14    echo "Exception is thrown";
15}
16?>
17--EXPECT--
18Exception is thrown
19