onursimsek / unparse-url
Reverse parsed url
Installs: 54 235
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.1|^8.2|^8.3
Requires (Dev)
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-12-11 12:05:35 UTC
README
Installation
You can install the package via composer:
composer require onursimsek/unparse-url
Usage
This package reverses parse_url()
result. Here's a demo of how you can use it:
$parsedUrl = parse_url('https://github.com/onursimsek/unparse-url'); /*[ "scheme" => "https", "host" => "github.com", "path" => "/onursimsek/unparse-url", ]*/ echo new UnparseUrl\UnparseUrl($parsedUrl); // https://github.com/onursimsek/unparse-url
You can use helper function.
$parsedUrl = [ 'scheme' => 'https', 'host' => 'github.com', 'path' => '/onursimsek/unparse-url', ]; echo unparse_url($parsedUrl); // https://github.com/onursimsek/unparse-url