- var_dump: documentation ( source)
- parse_url: documentation ( source)
<?php
// Everything you enter here will be executed by our servers. Try it!
$url = 'http://www.example.com/';
$rel = 'path/to/somewhere#foo?baz=quix';
var_dump(parse_url($rel), prase_url($url . $rel));