public static function catchFatalErrorsEarly()
    {
        $error = error_get_last();
        if (($error['type'] === E_ERROR || $error['type'] === E_PARSE)) {
            echo nl2br(str_replace(dirname(dirname(__DIR__)), '', $error['message']));
        }
    }
public static function catchFatalErrorsEarly()
    {
        $error = error_get_last();
        if (($error['type'] === E_ERROR || $error['type'] === E_PARSE)) {
            echo nl2br(str_replace(dirname(dirname(__DIR__)), '', $error['message']));
        }
    }
public static function catchFatalErrorsEarly ( ) { $ error = error_get_last ( ) ; if ( ( $ error [ 'type' ] === E_ERROR || $ error [ 'type' ] === E_PARSE ) ) { echo nl2br ( str_replace ( dirname ( dirname ( __DIR__ ) ) , '' , $ error [ 'message' ] ) ) ; } }
Catch and display errors that occur before the Application object has
been instantiated.

If the error occurs later in the application life cycle, we flush this
output in catchFatalErrors() which has access to the Application object.
Catch and display errors that occur before the Application object has been instantiated .