If you have the need to check whether an error was a fatal error before PHP 5.2 (in my case, within an output buffer handler), you can use the following hack:
<?php
if (function_exists('error_get_last')) {
$lastPHPError = error_get_last();
$phpFatalError = isset($lastPHPError) && $lastPHPError['type'] === E_ERROR;
} else {
$phpFatalError = strstr($output, '<b>Fatal error</b>:') && ! strstr($output, '</html>');
}
?>
This is, of course, language-dependent, so it wouldn't be good in widely-distributed code, but it may help in certain cases (or at least be the base of something that would work).