public function parse($headers)
    {
        $lines = preg_split("/(\r|\n)+/", $headers, -1, PREG_SPLIT_NO_EMPTY);
        array_shift($lines);

        foreach ($lines as $line) {
            list($name, $value) = explode(':', $line, 2);
            $this->{strtolower(trim($name))} = trim($value);
        }
    }
public function parse($headers)
    {
        $lines = preg_split("/(\r|\n)+/", $headers, -1, PREG_SPLIT_NO_EMPTY);
        array_shift($lines);

        foreach ($lines as $line) {
            list($name, $value) = explode(':', $line, 2);
            $this->{strtolower(trim($name))} = trim($value);
        }
    }
public function parse ( $ headers ) { $ lines = preg_split ( "/(\r|\n)+/" , $ headers , - 1 , PREG_SPLIT_NO_EMPTY ) ; array_shift ( $ lines ) ; foreach ( $ lines as $ line ) { list ( $ name , $ value ) = explode ( ':' , $ line , 2 ) ; $ this -> { strtolower ( trim ( $ name ) ) } = trim ( $ value ) ; } }
Parse a header string into the object
@param $headers
Parse a header string into the object