midnite81 / urlparser
A PHP 7.1+ package to parse urls
Installs: 2 892
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- ext-json: *
Requires (Dev)
- illuminate/support: ^5.7
- phpunit/phpunit: ^7.5
- satooshi/php-coveralls: ^2.0
- symfony/var-dumper: ^4.2
This package is auto-updated.
Last update: 2024-11-14 02:30:54 UTC
README
A PHP 7.1+ URL parser for easy manipulation of URLs
Installation
This package requires PHP 7.1+.
To install through composer include the package in your composer.json
.
"midnite81/urlparser": "^1.0"
Run composer install
or composer update
to download the dependencies or you can run
composer require midnite81/urlparser
.
Example Usage
<?php include '/path/to/vendor/autoload.php'; $url = new Midnite81\UrlParser\Url('http://example.com/gallery/houses?hiRes=1#forSale'); echo $url->path(); // returns '/gallery/houses' echo $url->fileName() // returns 'houses'