protected function obtainErrorType(int $errSeverity): string
    {
        $errorMap = [
            E_ERROR             => 'Fatal',
            E_CORE_ERROR        => 'Fatal',
            E_USER_ERROR        => 'Fatal',
            E_COMPILE_ERROR     => 'Fatal',
            E_RECOVERABLE_ERROR => 'Fatal',
            E_WARNING           => 'Warning',
            E_CORE_WARNING      => 'Warning',
            E_USER_WARNING      => 'Warning',
            E_COMPILE_WARNING   => 'Warning',
            E_PARSE             => 'Parse',
            E_NOTICE            => 'Notice',
            E_USER_NOTICE       => 'Notice',
            E_STRICT            => 'Strict',
            E_DEPRECATED        => 'Deprecated',
            E_USER_DEPRECATED   => 'Deprecated'
        ];

        //Default value if the error is not found in the map array
        $errType = 'Unknown';
        
        //Search in map array
        if (isset($errorMap[$errSeverity])) {
            $errType = $errorMap[$errSeverity];
        }
        
        return $errType;
    }
protected function obtainErrorType(int $errSeverity): string
    {
        $errorMap = [
            E_ERROR             => 'Fatal',
            E_CORE_ERROR        => 'Fatal',
            E_USER_ERROR        => 'Fatal',
            E_COMPILE_ERROR     => 'Fatal',
            E_RECOVERABLE_ERROR => 'Fatal',
            E_WARNING           => 'Warning',
            E_CORE_WARNING      => 'Warning',
            E_USER_WARNING      => 'Warning',
            E_COMPILE_WARNING   => 'Warning',
            E_PARSE             => 'Parse',
            E_NOTICE            => 'Notice',
            E_USER_NOTICE       => 'Notice',
            E_STRICT            => 'Strict',
            E_DEPRECATED        => 'Deprecated',
            E_USER_DEPRECATED   => 'Deprecated'
        ];

        //Default value if the error is not found in the map array
        $errType = 'Unknown';
        
        //Search in map array
        if (isset($errorMap[$errSeverity])) {
            $errType = $errorMap[$errSeverity];
        }
        
        return $errType;
    }
protected function obtainErrorType ( int $ errSeverity ) : string { $ errorMap = [ E_ERROR => 'Fatal' , E_CORE_ERROR => 'Fatal' , E_USER_ERROR => 'Fatal' , E_COMPILE_ERROR => 'Fatal' , E_RECOVERABLE_ERROR => 'Fatal' , E_WARNING => 'Warning' , E_CORE_WARNING => 'Warning' , E_USER_WARNING => 'Warning' , E_COMPILE_WARNING => 'Warning' , E_PARSE => 'Parse' , E_NOTICE => 'Notice' , E_USER_NOTICE => 'Notice' , E_STRICT => 'Strict' , E_DEPRECATED => 'Deprecated' , E_USER_DEPRECATED => 'Deprecated' ] ; //Default value if the error is not found in the map array $ errType = 'Unknown' ; //Search in map array if ( isset ( $ errorMap [ $ errSeverity ] ) ) { $ errType = $ errorMap [ $ errSeverity ] ; } return $ errType ; }
Map array to have a human readable severity.

@see http://fr2.php.net/manual/fr/function.set-error-handler.php#113567

@param int $errSeverity : The error severity with PHP constant

@return string
Map array to have a human readable severity .