php relative urls to absolute urls conversion with eventually base href html tag
===

I've a page loaded with DOM, then I want to convert all relative URLs of anchors to absolute URLs according to, eventually, the `<base href>` tag

I'm looking for something tested, not some random script that fails on some cases

I'm interested in parsing of every form of href="" usage:

    href="relative.php"
    href="/absolute1.php"
    href="./relative.php"
    href="../relative.php"
    href="//absolutedomain.org"
    href="." relative
    href=".." relative
    href="../" relative
    href="./" relative

and more complex ones mixed

thank you in advance