public function current(): array
    {
        if (($headers = &$this->cacheKey(__FUNCTION__)) !== null) {
            return $headers; // Cached this already.
        }
        $headers = []; // Initialize.

        foreach ($_SERVER as $_header => $_value) {
            if (mb_stripos($_header, 'HTTP_') === 0) {
                $_header                          = preg_replace('/^HTTP_/ui', '', $_header);
                $_header                          = str_replace('_', '-', $_header);
                $headers[mb_strtolower($_header)] = $_value;
            }
        } // unset($_header, $_value); // Housekeeping.

        return $headers;
    }
public function current(): array
    {
        if (($headers = &$this->cacheKey(__FUNCTION__)) !== null) {
            return $headers; // Cached this already.
        }
        $headers = []; // Initialize.

        foreach ($_SERVER as $_header => $_value) {
            if (mb_stripos($_header, 'HTTP_') === 0) {
                $_header                          = preg_replace('/^HTTP_/ui', '', $_header);
                $_header                          = str_replace('_', '-', $_header);
                $headers[mb_strtolower($_header)] = $_value;
            }
        } // unset($_header, $_value); // Housekeeping.

        return $headers;
    }
public function current ( ) : array { if ( ( $ headers = & $ this -> cacheKey ( __FUNCTION__ ) ) !== null ) { return $ headers ; // Cached this already. } $ headers = [ ] ; // Initialize. foreach ( $ _SERVER as $ _header => $ _value ) { if ( mb_stripos ( $ _header , 'HTTP_' ) === 0 ) { $ _header = preg_replace ( '/^HTTP_/ui' , '' , $ _header ) ; $ _header = str_replace ( '_' , '-' , $ _header ) ; $ headers [ mb_strtolower ( $ _header ) ] = $ _value ; } } // unset($_header, $_value); // Housekeeping. return $ headers ; }
Current request headers.

@since 170824.30708 Current request headers.

@return array Unique/associative array of all headers.
Current request headers .