Search code examples
php

How can I retrieve the current error handler?


I'd like to find out what error handler is currently, well, handling errors.

I know that set_error_handler() will return the previous error handler, but is there a way to find out what the current error handler is without setting a new one?


Solution

  • This isn't possible in PHP - as you said, you could retrive the current error handler when you call set_error_handler and restore it with restore_error_handler