3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(parse_url('://www.example.com/foo/bar?foo=23&bar=42'));
Output for 5.3.6 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { ["path"]=> string(26) "://www.example.com/foo/bar" ["query"]=> string(13) "foo=23&bar=42" }
Output for 5.3.3 - 5.3.5
bool(false)
Output for 5.2.3 - 5.3.2
Warning: parse_url(://www.example.com/foo/bar?foo=23&bar=42): Unable to parse URL in /in/058tG on line 1 bool(false)
Output for 5.2.0 - 5.2.2
<br /> <b>Warning</b>: parse_url(://www.example.com/foo/bar?foo=23&amp;bar=42) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in <b>/in/058tG</b> on line <b>1</b><br /> bool(false)
Output for 4.4.3 - 4.4.9, 5.1.2 - 5.1.6
<br /> <b>Warning</b>: parse_url(://www.example.com/foo/bar?foo=23&amp;bar=42) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse url in <b>/in/058tG</b> on line <b>1</b><br /> bool(false)
Output for 5.0.0 - 5.1.1
<br /> <b>Warning</b>: parse_url(://www.example.com/foo/bar?foo=23&bar=42) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse url in <b>/in/058tG</b> on line <b>1</b><br /> bool(false)
Output for 4.3.2 - 4.4.2
<br /> <b>Warning</b>: parse_url(://www.example.com/foo/bar?foo=23&bar=42): Unable to parse url in <b>/in/058tG</b> on line <b>1</b><br /> bool(false)
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: parse_url(://www.example.com/foo/bar?foo=23&bar=42) [<a href='http://www.php.net/function.parse-url'>function.parse-url</a>]: Unable to parse url in <b>/in/058tG</b> on line <b>1</b><br /> bool(false)