original_string: protected function _parseHeaders($headers)
      {
          foreach ($headers as $key => $value) {
              if (substr($value, 0, 5) === 'HTTP/') {
                  preg_match('/HTTP\/([\d.]+) ([0-9]+)(.*)/i', $value, $matches);
                  $this->protocol = $matches[1];
                  $this->code = (int)$matches[2];
                  $this->reasonPhrase = trim($matches[3]);
                  continue;
              }
              if (strpos($value, ':') === false) {
                  continue;
              }
              list($name, $value) = explode(':', $value, 2);
              $value = trim($value);
              $name = trim($name);
  
              $normalized = strtolower($name);
  
              if (isset($this->headers[$name])) {
                  $this->headers[$name][] = $value;
              } else {
                  $this->headers[$name] = (array)$value;
                  $this->headerNames[$normalized] = $name;
              }
          }
      }
code: protected function _parseHeaders($headers)
      {
          foreach ($headers as $key => $value) {
              if (substr($value, 0, 5) === 'HTTP/') {
                  preg_match('/HTTP\/([\d.]+) ([0-9]+)(.*)/i', $value, $matches);
                  $this->protocol = $matches[1];
                  $this->code = (int)$matches[2];
                  $this->reasonPhrase = trim($matches[3]);
                  continue;
              }
              if (strpos($value, ':') === false) {
                  continue;
              }
              list($name, $value) = explode(':', $value, 2);
              $value = trim($value);
              $name = trim($name);
  
              $normalized = strtolower($name);
  
              if (isset($this->headers[$name])) {
                  $this->headers[$name][] = $value;
              } else {
                  $this->headers[$name] = (array)$value;
                  $this->headerNames[$normalized] = $name;
              }
          }
      }
code_tokens: protected function _parseHeaders ( $ headers ) { foreach ( $ headers as $ key => $ value ) { if ( substr ( $ value , 0 , 5 ) === 'HTTP/' ) { preg_match ( '/HTTP\/([\d.]+) ([0-9]+)(.*)/i' , $ value , $ matches ) ; $ this -> protocol = $ matches [ 1 ] ; $ this -> code = ( int ) $ matches [ 2 ] ; $ this -> reasonPhrase = trim ( $ matches [ 3 ] ) ; continue ; } if ( strpos ( $ value , ':' ) === false ) { continue ; } list ( $ name , $ value ) = explode ( ':' , $ value , 2 ) ; $ value = trim ( $ value ) ; $ name = trim ( $ name ) ; $ normalized = strtolower ( $ name ) ; if ( isset ( $ this -> headers [ $ name ] ) ) { $ this -> headers [ $ name ] [ ] = $ value ; } else { $ this -> headers [ $ name ] = ( array ) $ value ; $ this -> headerNames [ $ normalized ] = $ name ; } } }
docstring: Parses headers if necessary.
  
  - Decodes the status code and reasonphrase.
  - Parses and normalizes header names + values.
  
  @param array $headers Headers to parse.
  @return void
docstring_tokens: Parses headers if necessary .