isFatalError() public static method

Returns if error is one of fatal type.
public static isFatalError ( array $error ) : boolean
$error array error got from error_get_last()
return boolean if error is one of fatal type
Beispiel #1
0
 /**
  * PHP shutdown function used to catch fatal errors.
  * This method should be registered as PHP error handler using
  * {@link register_shutdown_function}. The method throws an exception that
  * contains the error information.
  */
 public static function phpFatalErrorHandler()
 {
     $error = error_get_last();
     if ($error && TPhpErrorException::isFatalError($error) && error_reporting() & $error['type']) {
         self::exceptionHandler(new TPhpErrorException($error['type'], $error['message'], $error['file'], $error['line']));
     }
 }