- parse_url: documentation ( source)
<?php
function f($s) {
echo "'$s': ";
foreach (parse_url($s) as $k=>$v) echo "$k($v) ";
echo "\n";
}
f(' http://example.com/');
f('http://example.com#foo=1;bar=2');
f('http://example.com#foo=1/bar=2');
f('tel:1234567');
f('tel:05000');