src/Model/Page.php
protected function getHeadersAsArray($rawHeaders)
    {
        $headers = [];

        foreach (explode("\r\n", (string) $rawHeaders) as $header) {
            if (false !== strpos($header, ':')) {
                list($name, $headerStr) = explode(':', $header, 2);
                $headers[trim($name)] = trim($headerStr);
            }
        }

        return $headers;
    }
protected function getHeadersAsArray($rawHeaders)
    {
        $headers = [];

        foreach (explode("\r\n", (string) $rawHeaders) as $header) {
            if (false !== strpos($header, ':')) {
                list($name, $headerStr) = explode(':', $header, 2);
                $headers[trim($name)] = trim($headerStr);
            }
        }

        return $headers;
    }
protected function getHeadersAsArray ( $ rawHeaders ) { $ headers = [ ] ; foreach ( explode ( "\r\n" , ( string ) $ rawHeaders ) as $ header ) { if ( false !== strpos ( $ header , ':' ) ) { list ( $ name , $ headerStr ) = explode ( ':' , $ header , 2 ) ; $ headers [ trim ( $ name ) ] = trim ( $ headerStr ) ; } } return $ headers ; }
Converts the headers passed as string to an array.

@param string $rawHeaders The headers

@return array
Converts the headers passed as string to an array .