pjpawel / parse-url
Lightweight library to parse non-standard urls and standard too
v1.1.0
2022-05-09 12:24 UTC
Requires
- php: >=8.0
Requires (Dev)
- phpunit/phpunit: 9.5.20
README
PHP lightweight library to parse non-standard urls and standard urls too!
Installation
composer require pjpawel/parse-url
Actual list of conversion
Comparison with parse_url() -> Conversions
Basic usage
Full usage you will find here -> Wiki
<?php use pjpawel\UrlParser; $url = "www.malformed_url.com"; $parsedUrl = UrlParser::parse($url); var_dump($parsedUrl); /* array(1) { ["host"]=> string(21) "www.malformed_url.com" } */ echo UrlParser::createUrl($parsedUrl) /* www.malformed_url.com */
Output array of URL::parse()
is the same as parse_url()