diff options
Diffstat (limited to 'Zend/tests/bug60738_variation.phpt')
-rw-r--r-- | Zend/tests/bug60738_variation.phpt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/bug60738_variation.phpt b/Zend/tests/bug60738_variation.phpt new file mode 100644 index 0000000000..d7cf00ecdb --- /dev/null +++ b/Zend/tests/bug60738_variation.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #60738 Allow 'set_error_handler' to handle NULL +--FILE-- +<?php + +var_dump(set_exception_handler( + function() { echo 'Intercepted exception!', "\n"; } +)); + +var_dump(set_exception_handler(null)); + +throw new Exception('Exception!'); +?> +--EXPECTF-- +NULL +object(Closure)#1 (0) { +} + +Fatal error: Uncaught exception 'Exception' with message 'Exception!' in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d + |