Voting

: six plus three?
(Example: nine)

The Note You're Voting On

michael at getsprink dot com
15 years ago
The error_get_last() function will give you the most recent error even when that error is a Fatal error.

Example Usage:

<?php

register_shutdown_function
('handleFatalPhpError');

function
handleFatalPhpError() {
$last_error = error_get_last();
if(
$last_error['type'] === E_ERROR) {
echo
"Can do custom output and/or logging for fatal error here...";
}
}

?>

<< Back to user notes page

To Top