3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://www.somehost.com/test/index.html?param1=4&param2=3&param3=2&param4=1&param5=3'; function process_url($url) { $parts = parse_url($url); parse_str($parts['query'], $query); $query = array_diff($query, array('3')); asort($query); $query['url'] = $parts['path']; $parts['query'] = http_build_query($query); $new_url = http_build_url($parts); //$new_url = $parts['scheme'] . '://' . $parts['host'] . '/?' . $parts['query']; return $new_url; } var_dump(process_url($url));
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function http_build_url() in /in/sugJg:11 Stack trace: #0 /in/sugJg(16): process_url('https://www.som...') #1 {main} thrown in /in/sugJg on line 11
Process exited with code 255.

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:
41.98 ms | 401 KiB | 8 Q