Skip to content

Instantly share code, notes, and snippets.

@gcatlin
gcatlin / multiple-error-handlers.php
Created May 30, 2013 13:53
Adds support for multiple error handlers in PHP
<?php
function append_error_handler($handler) {
set_error_handlers(array(set_error_handler($handler), $handler));
}
function prepend_error_handler($handler) {
set_error_handlers(array($handler, set_error_handler($handler)));
}