PHPackages                             linkuha/uri - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. linkuha/uri

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

linkuha/uri
===========

Uri validator and fixer

1.0beta(6y ago)040MITPHPPHP &gt;=5.6.0

Since Nov 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/linkuha/php-uri)[ Packagist](https://packagist.org/packages/linkuha/uri)[ Docs](https://github.com/linkuha/php-uri)[ RSS](/packages/linkuha-uri/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

`parse_url($url)` function and `filter_var($url, FILTER_VALIDATE_URL)` are weak for parsing and validating purposes.

Install: `composer require linkuha/uri:dev-master`

Usage example:

```
$myParser = (new UriParser)
    ->allowLocalDomain()
    ->allowLocalIp()
    ->allowWithoutScheme()
    ->allowPunycode(true);

$myValidator = new HttpValidator($myParser);

$validStatus = $myValidator->validate($url);
$parsedParts = $myValidator->getLastParts();

if (! $myValidator->isSecure($url)) {
    $validStatus = false;
}

$fix = $myValidator->suggestFix($parsedParts);

```

You can use UriParser separately or extend AbstractValidator with builder design pattern to custom own.

UriHelper contains URI manipulating static things (not all are fullness tested).

You can use any another libraries. For ex.: `zendframework/zend-uri`, `symfony/validator`, `league/uri-parser`, `guzzlehttp/guzzle`. For URI normalizing purpose the Guzzle is win by my opinion (tests).

For parsing/validating purposes no one of these are not fullness correctly validate all my test valid/invalid URLs set (will attach later).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2370d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5954300219c1a8bf1f533829fa72dcc2f2fddfd9e456356bd1636d671d25530e?d=identicon)[linkuha](/maintainers/linkuha)

---

Top Contributors

[![linkuha](https://avatars.githubusercontent.com/u/5617982?v=4)](https://github.com/linkuha "linkuha (2 commits)")

---

Tags

urlurirfc3986parse\_urlrfc3987parser

### Embed Badge

![Health badge](/badges/linkuha-uri/health.svg)

```
[![Health](https://phpackages.com/badges/linkuha-uri/health.svg)](https://phpackages.com/packages/linkuha-uri)
```

###  Alternatives

[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

538204.9M23](/packages/league-uri-interfaces)[crwlr/url

Swiss Army knife for URLs.

11073.3k3](/packages/crwlr-url)[vstelmakh/url-highlight

Library to parse urls from string input

102849.1k9](/packages/vstelmakh-url-highlight)[riimu/kit-urlparser

RFC 3986 compliant url parsing library with PSR-7 Uri component

33565.4k2](/packages/riimu-kit-urlparser)[zenstruck/uri

Object-oriented wrapper/manipulator for parse\_url with additional features.

1767.8k5](/packages/zenstruck-uri)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
