src/URL/Normalizer.php
private function parseStr($string)
    {
        $params = array();
                
        $pairs = explode('&', $string);

        foreach ($pairs as $pair) {
            if (! $pair) {
                continue;
            }

            $var = explode('=', $pair, 2);
            $val = ( isset( $var[1] ) ? $var[1] : '' );

            if (isset($params[$var[0]])) {
                if (is_array($params[$var[0]])) {
                    $params[$var[0]][] = $val;
                } else {
                    $params[$var[0]] = array($params[$var[0]], $val);
                }
            } else {
                $params[$var[0]] = $val;
            }
        }

        return $params;
    }
private function parseStr($string)
    {
        $params = array();
                
        $pairs = explode('&', $string);

        foreach ($pairs as $pair) {
            if (! $pair) {
                continue;
            }

            $var = explode('=', $pair, 2);
            $val = ( isset( $var[1] ) ? $var[1] : '' );

            if (isset($params[$var[0]])) {
                if (is_array($params[$var[0]])) {
                    $params[$var[0]][] = $val;
                } else {
                    $params[$var[0]] = array($params[$var[0]], $val);
                }
            } else {
                $params[$var[0]] = $val;
            }
        }

        return $params;
    }
Replacement for PHP's parse_string which does not deal with spaces or dots in key names

@param string $string URL query string
@return array key value pairs