PHPackages                             app-verk/php-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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. app-verk/php-matcher

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

app-verk/php-matcher
====================

AppVerk extension of PHP Matcher, it enables you to match values with patterns

3.0(6mo ago)010.7k↓41%1MITPHPPHP ^8.3

Since Nov 15Pushed 6mo agoCompare

[ Source](https://github.com/AppVerk/php-matcher)[ Packagist](https://packagist.org/packages/app-verk/php-matcher)[ RSS](/packages/app-verk-php-matcher/feed)WikiDiscussions 6.x Synced 3d ago

READMEChangelog (4)Dependencies (6)Versions (9)Used By (0)

AppVerk PHP Matcher
===================

[](#appverk-php-matcher)

Library created for testing all kinds of JSON/XML/TXT/Scalar values against patterns.

API:

```
PHPMatcher::match($value = '{"foo": "bar"}', $pattern = '{"foo": "@string@"}') : bool;
PHPMatcher::backtrace() : Backtrace;
PHPMatcher::error() : ?string;
```

It was built to simplify API's functional testing.

Installation
------------

[](#installation)

Require new dev dependency using composer:

```
composer require --dev "app-verk/php-matcher"

```

Basic usage
-----------

[](#basic-usage)

### Direct PHPMatcher usage

[](#direct-phpmatcher-usage)

```
