PHPackages                             phprivoxy/matcher - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. phprivoxy/matcher

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phprivoxy/matcher
=================

Simple URI matcher without regular expressions.

v0.7.0(2y ago)07MITPHPPHP &gt;=8.1

Since Jun 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phprivoxy/matcher)[ Packagist](https://packagist.org/packages/phprivoxy/matcher)[ Docs](https://www.phprivoxy.ru)[ RSS](/packages/phprivoxy-matcher/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

phprivoxy/matcher
=================

[](#phprivoxymatcher)

Simple URI matcher.
-------------------

[](#simple-uri-matcher)

### Requirements

[](#requirements)

- **PHP &gt;= 8.1**

### Installation

[](#installation)

#### Using composer (recommended)

[](#using-composer-recommended)

```
composer create phprivoxy/matcher
```

### Does pattern match the URI

[](#does-pattern-match-the-uri)

```
$uri = 'www.site.ru/cat/page.html';
$matcher = new PHPrivoxy\Matcher\UriMatcher($uri);

$matcher->match('*');               // TRUE
$matcher->match('.');               // TRUE
$matcher->match(''); // FALSE
$matcher->match('site.ru'); // FALSE
$matcher->match('.site.ru');        // TRUE
$matcher->match('*.site.ru');       // TRUE
$matcher->match('*site*');          // TRUE
$matcher->match('.ite.ru'); // FALSE
$matcher->match('*ite.ru');         // TRUE
$matcher->match('/page.html'); // FALSE
$matcher->match('/*page.html');     // TRUE
$matcher->match('/ca');             // TRUE
$matcher->match('/ca*');            // TRUE
$matcher->match('/ca$'); // FALSE
$matcher->match('/cat/page.html$'); // TRUE
$matcher->match('/cat/page.html');  // TRUE
$matcher->match('/cat/page.htm');   // TRUE
$matcher->match('/cat/page.htm');   // TRUE
$matcher->match('*ite.ru/cat/pag'); // TRUE
$matcher->match('*/cat/page.*');    // TRUE
```

Any samples you also may find at "tests" directory.

### Does URI match the patterns

[](#does-uri-match-the-patterns)

```
$patterns = [
    '.яндекс.рф/search',
    'microsoft.com/office',
    '*.microsoft.com/windows',
    '.windows.com',
    'github.com',
    '*linux*'
];

$matcher = new PHPrivoxy\Matcher\PatternsMatcher($patterns);
$matcher->match('https://www.яндекс.рф/'); // FALSE
$matcher->match('https://www.яндекс.рф/search.html');    // TRUE
$matcher->match('https://www.linuxmint.com/');           // TRUE
$matcher->match('https://www.microsoft.com/other/linux-vs-windows/'); // FALSE
$matcher->match('https://www.github.com/windows'); // FALSE
$matcher->match('https://github.com/os2');               // TRUE
$matcher->match('https://linux.github.com/');            // TRUE
$matcher->match('https://www.microsoft.com/office'); // FALSE
$matcher->match('https://microsoft.com/office2024');     // TRUE
$matcher->match('http://left.site/not-exist.html'); // FALSE
```

### License

[](#license)

MIT License See [LICENSE](LICENSE)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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

735d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/172364593?v=4)[PHPrivoxy](/maintainers/phprivoxy)[@phprivoxy](https://github.com/phprivoxy)

---

Top Contributors

[![phprivoxy](https://avatars.githubusercontent.com/u/172364593?v=4)](https://github.com/phprivoxy "phprivoxy (3 commits)")

---

Tags

urluripatternMatchmatcherpatternswildcard

### Embed Badge

![Health badge](/badges/phprivoxy-matcher/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[league/uri-components

URI components manipulation library

31940.5M98](/packages/league-uri-components)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[anthropic-ai/sdk

Anthropic PHP SDK

163583.3k17](/packages/anthropic-ai-sdk)

PHPackages © 2026

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