--- layout: default title: URI partial modifiers --- URI modifiers ======= ## Example For instance here's how you would update the query string from a given URI object: ~~~php getQuery(), $params); parse_str($queryToMerge, $paramsToMerge); $query = http_build_query( array_merge($params, $paramsToMerge), '', '&', PHP_QUERY_RFC3986 ); $newUri = $uri->withQuery($query); echo $newUri; // display http://www.example.com?fo_o=bar&taz=#~typo ~~~ Using the provided `League\Uri\UriModifier::mergeQuery` modifier the code becomes ~~~php