PHP code example of innmind / url-resolver

1. Go to this page and download the library: Download innmind/url-resolver library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

innmind / url-resolver example snippets


use Innmind\UrlResolver\UrlResolver;
use Innmind\Url\Url;

$resolve = UrlResolver::of('http', 'https');

$url = $resolve(
    Url::of('http://example.com/foo/'),
    Url::of('./bar/baz?query=string#fragment'),
);
// $url resolves to http://example.com/foo/bar/baz?query=string#fragment