summaryrefslogtreecommitdiff
path: root/Zend/tests/bug60738_variation.phpt
blob: cf2ea607a08fbbe180545f3272bdc38e82271835 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--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! in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d