protected function parseResponseHeaders()
    {
        if ($this->responseHeader !== null) {
            $headers = explode("\n", $this->responseHeader);
            foreach ($headers as $header) {
                if (strpos($header, 'HTTP') !== false) {
                    $this->version = substr($header, 0, strpos($header, ' '));
                    $this->version = substr($this->version, (strpos($this->version, '/') + 1));
                    preg_match('/\d\d\d/', trim($header), $match);
                    $this->code = $match[0];
                    $this->message = trim(str_replace('HTTP/'.$this->version.' '.$this->code.' ', '', $header));
                } elseif (strpos($header, ':') !== false) {
                    $name = substr($header, 0, strpos($header, ':'));
                    $value = substr($header, strpos($header, ':') + 1);
                    $this->responseHeaders[trim($name)] = trim($value);
                }
            }
        }
    }
protected function parseResponseHeaders()
    {
        if ($this->responseHeader !== null) {
            $headers = explode("\n", $this->responseHeader);
            foreach ($headers as $header) {
                if (strpos($header, 'HTTP') !== false) {
                    $this->version = substr($header, 0, strpos($header, ' '));
                    $this->version = substr($this->version, (strpos($this->version, '/') + 1));
                    preg_match('/\d\d\d/', trim($header), $match);
                    $this->code = $match[0];
                    $this->message = trim(str_replace('HTTP/'.$this->version.' '.$this->code.' ', '', $header));
                } elseif (strpos($header, ':') !== false) {
                    $name = substr($header, 0, strpos($header, ':'));
                    $value = substr($header, strpos($header, ':') + 1);
                    $this->responseHeaders[trim($name)] = trim($value);
                }
            }
        }
    }
protected function parseResponseHeaders ( ) { if ( $ this -> responseHeader !== null ) { $ headers = explode ( "\n" , $ this -> responseHeader ) ; foreach ( $ headers as $ header ) { if ( strpos ( $ header , 'HTTP' ) !== false ) { $ this -> version = substr ( $ header , 0 , strpos ( $ header , ' ' ) ) ; $ this -> version = substr ( $ this -> version , ( strpos ( $ this -> version , '/' ) + 1 ) ) ; preg_match ( '/\d\d\d/' , trim ( $ header ) , $ match ) ; $ this -> code = $ match [ 0 ] ; $ this -> message = trim ( str_replace ( 'HTTP/' . $ this -> version . ' ' . $ this -> code . ' ' , '' , $ header ) ) ; } elseif ( strpos ( $ header , ':' ) !== false ) { $ name = substr ( $ header , 0 , strpos ( $ header , ':' ) ) ; $ value = substr ( $ header , strpos ( $ header , ':' ) + 1 ) ; $ this -> responseHeaders [ trim ( $ name ) ] = trim ( $ value ) ; } } } }
Parse headers.

@since 3.0.0

@return void
Parse headers .