3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = "http://foobar.com/foo/bar/1?baz=qux#fragment/foo"; echo parse_url($url, PHP_URL_PATH);
based on kank7
Output for 5.1.2 - 7.2.0
/foo/bar/1
Output for 4.3.0 - 5.1.1
Notice: Use of undefined constant PHP_URL_PATH - assumed 'PHP_URL_PATH' in /in/KO9U9 on line 4 Warning: parse_url() expects exactly 1 parameter, 2 given in /in/KO9U9 on line 4