summaryrefslogtreecommitdiff
path: root/Zend/tests/bug46196.phpt
blob: 13695f8afa473a8d6100563992b8079f6363c7cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Test restore_error_handler() function : bug #46196
--CREDITS--
Olivier Doucet
--FILE--
<?php
/* Prototype  : void restore_error_handler(void)
 * Description: Restores the previously defined error handler function
 * Source code: Zend/zend_builtin_functions.c
 * Alias to functions:
 */

echo "*** Testing restore_error_handler() : error bug #46196 ***\n";

var_dump( set_error_handler( 'myErrorHandler' ) );
var_dump( restore_error_handler() );
var_dump( set_error_handler( 'myErrorHandler' ) );

function myErrorHandler($errno, $errstr, $errfile, $errline)
{
    return true;
}

?>
===DONE===
--EXPECTF--
*** Testing restore_error_handler() : error bug #46196 ***
NULL
bool(true)
NULL
===DONE===