1. Go to this page and download the library: Download quillstack/uri 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/ */
quillstack / uri example snippets
$factory = new UriFactory();
use Quillstack\DI\Container;
use Quillstack\Uri\Factory\UriFactory;
$factory = (new Container())->get(UriFactory::class);
$uri = $factory->createUri('https://user:[email protected]:8443/users/42?page=2#top');
$uri->getScheme(); // 'https'
$uri->getHost(); // 'example.com'
$uri->getPort(); // 8443
$uri->getPath(); // '/users/42'
$uri->getQuery(); // 'page=2'
$uri->getFragment(); // 'top'
$uri->getUserInfo(); // 'user:secret'
$uri->getAuthority(); // 'user:[email protected]:8443'
(string) $uri; // what went in, unchanged