public static function getHeader($header, $defaultValue = '')
    {
        $header = strtolower(str_replace(['_', ' '], '-', $header));
        $headers = self::getHeaders();
        if (is_array($headers)) {
            foreach ($headers as $name => $value) {
                if (strtolower($name) == $header) {
                    return $value;
                }
            }
        }
        return $defaultValue;
    }
public static function getHeader($header, $defaultValue = '')
    {
        $header = strtolower(str_replace(['_', ' '], '-', $header));
        $headers = self::getHeaders();
        if (is_array($headers)) {
            foreach ($headers as $name => $value) {
                if (strtolower($name) == $header) {
                    return $value;
                }
            }
        }
        return $defaultValue;
    }
public static function getHeader ( $ header , $ defaultValue = '' ) { $ header = strtolower ( str_replace ( [ '_' , ' ' ] , '-' , $ header ) ) ; $ headers = self :: getHeaders ( ) ; if ( is_array ( $ headers ) ) { foreach ( $ headers as $ name => $ value ) { if ( strtolower ( $ name ) == $ header ) { return $ value ; } } } return $ defaultValue ; }
Get header.

@param string $header
@param string $defaultValue
@return mixed|string
Get header .