3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://username:password@hostname/path?arg=value#anchor'; print_r(parse_url($url)); var_dump(parse_url($url, PHP_URL_SCHEME)); var_dump(parse_url($url, PHP_URL_HOST)); var_dump(parse_url($url, PHP_URL_PORT)); var_dump(parse_url($url, PHP_URL_USER)); var_dump(parse_url($url, PHP_URL_PASS)); var_dump(parse_url($url, PHP_URL_QUERY)); var_dump(parse_url($url, PHP_URL_FRAGMENT));

preferences:
92.61 ms | 402 KiB | 5 Q