php/php-src — pull request #20 by nikic (2012-03-24 13:00:08+00:00)
Title: Improve error and exception handlers

This allows resetting the error handler using `set_error_handler(null)`.

Additionally it changes the behavior of both `set_error_handler` and `set_exception_handler` to return the previous error/exception handler when being reset (this is consistent with their normal behavior).

Also it cleans up the code a bit.

This is a followup to PR #18 and bug https://bugs.php.net/bug.php?id=60738.