lukaszmakuch/value-matcher

Checks whether two values match.

v0.0.5 2016-01-16 17:16 UTC

This package is not auto-updated.

Last update: 2024-05-15 16:14:23 UTC


README

Allows to check whether two values somehow match.

Usage

StrictStringMatcher

$m = new \lukaszmakuch\ValueMatcher\String\StrictStringMatcher("Abc");
$m->matches("Abc"); //true
$m->matches("abc"); //false

RegExpStringMatcher

$m = new \lukaszmakuch\ValueMatcher\String\RegExpStringMatcher("@^[a-z]x$@");
$m->matches("cx"); //true
$m->matches("xc"); //false

Installation

Use composer to get the latest version:

$ composer require lukaszmakuch/value-matcher