PHP code example of lukaszmakuch / value-matcher

1. Go to this page and download the library: Download lukaszmakuch/value-matcher library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lukaszmakuch / value-matcher example snippets


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

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