3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'http://www.baidu.com/x/y/index.php?a=1&b=2'; var_dump(parse_url($url));
based on CCYnV
Output for 4.3.0 - 7.2.0
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(13) "www.baidu.com" ["path"]=> string(14) "/x/y/index.php" ["query"]=> string(7) "a=1&b=2" }