Learning PHP
Advanced PHP
PHP Function Reference
PHP Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
PHP Function restore_error_handler()
Syntax
bool restore_error_handler ( void );
|
Definition and Usage
This function is used after changing the error handler function using set_error_handler(), to revert to the previous error handler (which could be the built-in or a user defined function)
Paramters
Parameter | Description |
void | NA
|
Return Value
This function always returns TRUE.
Example
Following is the usage of this function:
<?php
function unserialize_handler($errno, $errstr)
{
echo "Invalid serialized value.\n";
}
$serialized = 'foo';
set_error_handler('unserialize_handler');
$original = unserialize($serialized);
restore_error_handler();
?>
|
This will produce following result:
Invalid serialized value.
|
|
|
|