Skip to content

Object-oriented interface to parse_url/parse_str

License

Notifications You must be signed in to change notification settings

sanmai/parsed-url

Repository files navigation

Latest Stable Version Coverage Status

Install

composer require sanmai/parsed-url

Use

$url = new \ParsedUrl\ParsedUrl('https://www.example.com/index.html?foo=bar&baz=1');

var_dump($url->scheme); // string(5) "https"

var_dump($url->host); // string(15) "www.example.com"

var_dump($url->path); // "/index.html"

var_dump($url->query); // string(13) "foo=bar&baz=1"

var_dump($url->query()->foo); // string(3) "bar"

About

Object-oriented interface to parse_url/parse_str

Resources

License

Stars

Watchers

Forks

Sponsor this project