public function getHeaders(): array
    {
        $result = [];
        foreach ($this->headers as $headerInfo) {
            $result[$headerInfo[0]] = $headerInfo[1];
        }

        return $result;
    }
public function getHeaders(): array
    {
        $result = [];
        foreach ($this->headers as $headerInfo) {
            $result[$headerInfo[0]] = $headerInfo[1];
        }

        return $result;
    }
public function getHeaders ( ) : array { $ result = [ ] ; foreach ( $ this -> headers as $ headerInfo ) { $ result [ $ headerInfo [ 0 ] ] = $ headerInfo [ 1 ] ; } return $ result ; }
Returns all the HTTP headers as an array.

Every header is returned as an array, with one or more values.
Returns all the HTTP headers as an array .