xref: /PHP-8.3/sapi/phpdbg/tests/gh16181.phpt (revision f14e5cfa)
1--TEST--
2GH-16181 (phpdbg: exit in exception handler reports fatal error)
3--PHPDBG--
4r
5c
6q
7--FILE--
8<?php
9set_exception_handler(function() {
10	echo "exception caught\n";
11	die;
12});
13
14echo "throwing exception\n";
15throw new \Exception("oh noes");
16?>
17--EXPECTF--
18[Successful compilation of %s]
19prompt> throwing exception
20[Uncaught Exception in %s on line %d: oh noes]
21>00008: throw new \Exception("oh noes");
22 00009: ?>
23 00010:
24prompt> exception caught
25[Script ended normally]
26prompt>
27