Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

PHP Function restore_error_handler()


previous

Advertisements

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

ParameterDescription
voidNA

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.

previous Printer Friendly

Advertisements


  

Advertisements