3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Everything you enter here will be executed by our servers. Try it! $url = 'http://some.text.com/path/to/file.html?query=string#anchor'; $r = parse_url($url); var_dump($r);
Output for 4.3.0 - 7.1.0
array(5) { ["scheme"]=> string(4) "http" ["host"]=> string(13) "some.text.com" ["path"]=> string(18) "/path/to/file.html" ["query"]=> string(12) "query=string" ["fragment"]=> string(6) "anchor" }