3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $address = '//foo.com:123'; var_dump(parse_url($address));
Output for 5.5.24 - 5.5.38, 5.6.8 - 7.1.0
array(2) { ["host"]=> string(7) "foo.com" ["port"]=> int(123) }
Output for 5.3.3 - 5.5.23, 5.6.0 - 5.6.7
bool(false)
Output for 5.2.0 - 5.3.2
Warning: parse_url(//foo.com:123): Unable to parse URL in /in/AuXCX on line 4 bool(false)
Output for 4.3.2 - 5.1.6
Warning: parse_url(//foo.com:123): Unable to parse url in /in/AuXCX on line 4 bool(false)
Output for 4.3.0 - 4.3.1
array(2) { ["host"]=> string(9) "//foo.com" ["port"]=> int(123) }