3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 'http://username:password@hostname/path?arg=value#anchor'; list($host, , , , $port) = array_values(parse_url($url)); var_dump($host, $port);
Output for 4.3.0 - 7.1.0
string(4) "http" string(5) "/path"