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...";
}
}
?>