3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(parse_url('http://example.com?url=http://www.example.com?foo=bar'));
Output for 5.6.28, 7.0.20 - 7.2.0
array(3) { ["scheme"]=> string(4) "http" ["host"]=> string(11) "example.com" ["query"]=> string(34) "url=http://www.example.com?foo=bar" }
Output for 4.3.4 - 5.6.23, 7.0.0 - 7.0.8
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(20) "example.com?url=http" ["path"]=> string(17) "//www.example.com" ["query"]=> string(7) "foo=bar" }
Output for 4.3.2 - 4.3.3
Warning: parse_url(http://example.com?url=http://www.example.com?foo=bar): Unable to parse url in /in/vNbog on line 3 bool(false)
Output for 4.3.0 - 4.3.1
Warning: parse_url(http://example.com?url=http://www.example.com?foo=bar) [http://www.php.net/function.parse-url]: Unable to parse url in /in/vNbog on line 3 bool(false)