3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 'https://example.com/t/c/?cid=4924&sub1=342&asdjjn=2333'; print_r(parse_url($url)); $newUrl = 'https://example.com/t/t?ex=823948923849'; printf('%s&%s', $newUrl, $url['query']);
based on L3OaP
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Array ( [scheme] => https [host] => example.com [path] => /t/c/ [query] => cid=4924&sub1=342&asdjjn=2333 ) Warning: Illegal string offset 'query' in /in/Ijckv on line 10 https://example.com/t/t?ex=823948923849&h
Output for 4.3.0 - 5.3.29, hhvm-3.10.0 - 3.12.0
Array ( [scheme] => https [host] => example.com [path] => /t/c/ [query] => cid=4924&sub1=342&asdjjn=2333 ) https://example.com/t/t?ex=823948923849&h