xref: /PHP-7.4/Zend/tests/bug60738.phpt (revision f28c128b)
1--TEST--
2Bug #60738 Allow 'set_error_handler' to handle NULL
3--FILE--
4<?php
5
6var_dump(set_error_handler(
7    function() { echo 'Intercepted error!', "\n"; }
8));
9
10trigger_error('Error!');
11
12var_dump(set_error_handler(null));
13
14trigger_error('Error!');
15?>
16--EXPECTF--
17NULL
18Intercepted error!
19object(Closure)#1 (0) {
20}
21
22Notice: Error! in %s on line %d
23