3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'https://example.com/t/c/?cid=4924&sub1=342&asdjjn=2333'; $parts = parse_url($url); $newUrl = 'https://example.com/t/t?ex=823948923849'; printf('%s&%s', $newUrl, $parts['query']); parse_str($parts['query'], $output); print_r($output);
based on dHiUY
Output for 4.3.0 - 7.2.0
https://example.com/t/t?ex=823948923849&cid=4924&sub1=342&asdjjn=2333Array ( [cid] => 4924 [sub1] => 342 [asdjjn] => 2333 )