martinmdev / php-url
PHP Url
1.0.1
2019-09-25 02:40 UTC
Requires
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^8.3
This package is auto-updated.
Last update: 2024-10-25 14:30:19 UTC
README
Usage
<?php require __DIR__ . '/../vendor/autoload.php'; use Martinm\Url\Url; $url = new Url('http://example.com/path/to/index.php?x=1&y=2'); $url->getScheme(); // 'http' $url->getHost(); // 'example.com' $url->getPort(); // null $url->getPath(); // '/path/to/index.php' $url->getQuery(); // 'x=1&y=2'
Installation
composer require martinmdev/php-url