The League\Url
package provides simple and intuitive classes to create and manage Urls in PHP.
- Support underscore for domain name (e.i. http://sub_domain.main-domain.com). (issue https://github.com/thephpleague/url/issues/68)
- Path and Query decoding
- Update HostValidator to make sure domain has tld
- Simple API
- RFC3986 compliant
- Implements the
UriInterface
from PSR-7 - Fully documented
- Framework Agnostic
- Composer ready, PSR-2 and PSR-4 compliant
Full documentation can be found at url.thephpleague.com. Contribute to this documentation in the gh-pages branch
You need PHP >= 5.4.7 or HHVM >= 3.4 and the mbstring
extension to use the library, but the latest stable version of PHP/HHVM is recommended.
Note: The last stable version of League\Url
version 3.* still supports PHP 5.3
Install League\Url
using Composer.
$ composer require league/url
League\Url
has a PHPUnit test suite. To run the tests, run the following command from the project folder.
$ phpunit
Note: Contribute to the last stable version of League\Url
on the 3.x branch
Contributions are welcome and will be fully credited. Please see CONTRIBUTING for details.
If you discover any security related issues, please email nyamsprod@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.