mirror of
https://github.com/php/php-src.git
synced 2026-04-28 02:33:17 +02:00
f14e5cfaaa
When running PHP code, we must not handle `UnwindExit` exceptions, but rather have to ignore them. Closes GH-16182.
27 lines
480 B
PHP
27 lines
480 B
PHP
--TEST--
|
|
GH-16181 (phpdbg: exit in exception handler reports fatal error)
|
|
--PHPDBG--
|
|
r
|
|
c
|
|
q
|
|
--FILE--
|
|
<?php
|
|
set_exception_handler(function() {
|
|
echo "exception caught\n";
|
|
die;
|
|
});
|
|
|
|
echo "throwing exception\n";
|
|
throw new \Exception("oh noes");
|
|
?>
|
|
--EXPECTF--
|
|
[Successful compilation of %s]
|
|
prompt> throwing exception
|
|
[Uncaught Exception in %s on line %d: oh noes]
|
|
>00008: throw new \Exception("oh noes");
|
|
00009: ?>
|
|
00010:
|
|
prompt> exception caught
|
|
[Script ended normally]
|
|
prompt>
|