Net/Notifier/WebSocket/Handshake.php
protected function parseHeaderValue($value)
    {
        $values = explode(',', $value);

        // remove leading/trailing whitespace
        $values = array_map('trim', $values);

        // ignore empty values
        $values = array_filter(
            $values,
            create_function('$value', 'return ($value != \'\');')
        );

        // lowercase header values
        // remove leading/trailing whitespace
        $values = array_map('mb_strtolower', $values);

        return $values;
    }
protected function parseHeaderValue($value)
    {
        $values = explode(',', $value);

        // remove leading/trailing whitespace
        $values = array_map('trim', $values);

        // ignore empty values
        $values = array_filter(
            $values,
            create_function('$value', 'return ($value != \'\');')
        );

        // lowercase header values
        // remove leading/trailing whitespace
        $values = array_map('mb_strtolower', $values);

        return $values;
    }
protected function parseHeaderValue ( $ value ) { $ values = explode ( ',' , $ value ) ; // remove leading/trailing whitespace $ values = array_map ( 'trim' , $ values ) ; // ignore empty values $ values = array_filter ( $ values , create_function ( '$value' , 'return ($value != \'\');' ) ) ; // lowercase header values // remove leading/trailing whitespace $ values = array_map ( 'mb_strtolower' , $ values ) ; return $ values ; }
Parses a HTTP header value containing one or more tokens separated by
commas

Empty values are ignored. Only tokens are parsed, which means quoted
string values may not be parsed correctly.

See http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.1

@param string $value the raw HTTP header value to parse

@return array an array of parsed header values.
Parses a HTTP header value containing one or more tokens separated by commas