3v4l.org

run code in 500+ PHP versions simultaneously
<?php $replacements = array('value1' => 10000, 'external' => 'AAAAA'); $url = 'http://example.com/values?value1=12121&order=3&external=AFB3432'; // extract the query part $query = parse_url($url, PHP_URL_QUERY); // and parse it into variables parse_str($query, $params); // merge the parameter values with the replacements $new_params = array_merge($params, $replacements); // create a new query string $new_query = http_build_query($new_params); // and reassemble the URL $new_url = parse_url($url, PHP_URL_SCHEME) . "://" . parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH) . "?" . $new_query; echo $new_url;
Output for git.master, git.master_jit, rfc.property-hooks
http://example.com/values?value1=10000&order=3&external=AAAAA

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
106.46 ms | 1963 KiB | 4 Q