summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/tests/set_exception_handler.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/tests/set_exception_handler.phpt')
-rw-r--r--sapi/phpdbg/tests/set_exception_handler.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/sapi/phpdbg/tests/set_exception_handler.phpt b/sapi/phpdbg/tests/set_exception_handler.phpt
new file mode 100644
index 0000000000..7d4d4faca0
--- /dev/null
+++ b/sapi/phpdbg/tests/set_exception_handler.phpt
@@ -0,0 +1,19 @@
+--TEST--
+set_exception_handler() in phpdbg
+--PHPDBG--
+r
+c
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Uncaught Exception in %s on line 4: test]
+>00004: throw new Exception("test");
+ 00005:
+prompt> EX
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+
+set_exception_handler(function () { print "EX\n"; });
+throw new Exception("test");