3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(parse_url('://foo.com'), parse_url('://foo.com:80'));
Output for 5.3.6 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { ["path"]=> string(10) "://foo.com" } array(1) { ["path"]=> string(13) "://foo.com:80" }
Output for 5.3.3 - 5.3.5
bool(false) bool(false)
Output for 5.2.3 - 5.3.2
Warning: parse_url(://foo.com): Unable to parse URL in /in/oNaMM on line 3 Warning: parse_url(://foo.com:80): Unable to parse URL in /in/oNaMM on line 3 bool(false) bool(false)
Output for 5.2.0 - 5.2.2
<br /> <b>Warning</b>: parse_url(://foo.com) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in <b>/in/oNaMM</b> on line <b>3</b><br /> <br /> <b>Warning</b>: parse_url(://foo.com:80) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse URL in <b>/in/oNaMM</b> on line <b>3</b><br /> bool(false) bool(false)
Output for 4.4.3 - 5.1.6
<br /> <b>Warning</b>: parse_url(://foo.com) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse url in <b>/in/oNaMM</b> on line <b>3</b><br /> <br /> <b>Warning</b>: parse_url(://foo.com:80) [<a href='function.parse-url'>function.parse-url</a>]: Unable to parse url in <b>/in/oNaMM</b> on line <b>3</b><br /> bool(false) bool(false)
Output for 4.3.2 - 4.4.2
<br /> <b>Warning</b>: parse_url(://foo.com): Unable to parse url in <b>/in/oNaMM</b> on line <b>3</b><br /> <br /> <b>Warning</b>: parse_url(://foo.com:80): Unable to parse url in <b>/in/oNaMM</b> on line <b>3</b><br /> bool(false) bool(false)
Output for 4.3.0 - 4.3.1
<br /> <b>Warning</b>: parse_url(://foo.com) [<a href='http://www.php.net/function.parse-url'>function.parse-url</a>]: Unable to parse url in <b>/in/oNaMM</b> on line <b>3</b><br /> <br /> <b>Warning</b>: parse_url(://foo.com:80) [<a href='http://www.php.net/function.parse-url'>function.parse-url</a>]: Unable to parse url in <b>/in/oNaMM</b> on line <b>3</b><br /> bool(false) bool(false)