code: public function shutdownHandler()
      {
          $error = error_get_last();
          if ($error && $error['type'] & $this->fatalErrors) {
              $this->errorHandler(
                  $error['type'],
                  $error['message'],
                  $error['file'],
                  $error['line']
              );
          }
      }
docs: Catch errors in the shutdown process