savin/url

在 sabre/uri 库上的轻量级包装器

v1.0 2020-04-09 05:16 UTC

This package is auto-updated.

Last update: 2024-09-09 15:11:10 UTC


README

这是 sabre/uri 库上的一个轻量级包装器,是 Laravel 框架的包

安装

通过 Composer

$ composer require savin/url

使用方法


    $url = Url::parse('https://www.google.com/search?q=curent+time');
    
    var_dump($url);

    /*
        array(7) {
          ["scheme"]=>
          string(5) "https"
          ["host"]=>
          string(14) "www.google.com"
          ["path"]=>
          string(7) "/search"
          ["query"]=>
          string(13) "q=curent+time"
          ["port"]=>
          NULL
          ["user"]=>
          NULL
          ["fragment"]=>
          NULL
        }
    */