Hi,

At the moment, there is no direct way to fetch the currently
registered error or exception handlers. Users who need to inspect
these handlers must resort to a workaround that temporarily sets a new
handler and then immediately restores the previous one:

    $current_error_handler = set_error_handler('valid_callback');
    restore_error_handler();

This feels hackish and is error-prone.

I would like to propose the addition of two new functions:
get_error_handler(), get_exception_handler() to address this:

https://wiki.php.net/rfc/get-error-exception-handler

Best Regards,
Arnaud

Reply via email to