3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $first = "/calvin/master/?p=pages&id=3"; //DYNAMIC URL $second = "http://localhost/calvin/"; print_r(parse_url($first)); print_r(parse_url($second)); echo http_build_url("http://user@www.example.com/pub/index.php?a=b#files",array_merge(parse_url($second),parse_url($first)));
Output for 7.0.0 - 7.2.0
Array ( [path] => /calvin/master/ [query] => p=pages&id=3 ) Array ( [scheme] => http [host] => localhost [path] => /calvin/ ) Fatal error: Uncaught Error: Call to undefined function http_build_url() in /in/cjDWM:9 Stack trace: #0 {main} thrown in /in/cjDWM on line 9
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Array ( [path] => /calvin/master/ [query] => p=pages&id=3 ) Array ( [scheme] => http [host] => localhost [path] => /calvin/ ) Fatal error: Call to undefined function http_build_url() in /in/cjDWM on line 9
Process exited with code 255.