3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array("http://albertech.net/2011/03/php-find-port-number-from-url-using-regex/","http://albertech.net:80/2011/03/php-find-port-number-from-url-using-regex/","http://185.42.1.139:443/","185.42.1.139:443","185.42.1.139:443/index.php","http://185.42.1.139/cookiechecker.php?uri=/"); foreach($tests as $test) { var_dump( parse_url($test) ); echo "\n\r\n\r"; }

preferences:
72.65 ms | 402 KiB | 5 Q