PHP code example of kuria / url

1. Go to this page and download the library: Download kuria/url 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/ */

    

kuria / url example snippets



   

   use Kuria\Url\Url


   

   use Kuria\Url\Url


   var_dump(
       $url->getScheme(),
       $url->getHost(),
       $url->getFullHost(),
       $url->getPort(),
       $url->getPath(),
       $url->getQuery(),
       $url->getFragment()
   )


   

   use Kuria\Url\Url


   

   $url->set('parameter', 'value')


   

   $url->remove('foo')


   

   $url->add(['foo' => 'bar', 'lorem' => 'ipsum'])


   

   $url->setQuery(['foo' => 'bar'])


   

   $url->removeAll()


   

   use Kuria\Url\Url


   

   use Kuria\Url\Url


   

   use Kuria\Url\Url


   

   use Kuria\Url\Url