17 lines
321 B
PHP
17 lines
321 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
require __DIR__ . '/../autoload.php';
|
||
|
|
|
||
|
|
use Myrmidex\AnagramFinder\Matcher;
|
||
|
|
|
||
|
|
// are letters in word?
|
||
|
|
$anagram = "eamstexil";
|
||
|
|
$word = "steam";
|
||
|
|
|
||
|
|
assert(Matcher::check(anagram: $anagram, word: $word) === true);
|
||
|
|
|
||
|
|
$anagram = "eamstexil";
|
||
|
|
$word = "xxx";
|
||
|
|
|
||
|
|
assert(Matcher::check(anagram: $anagram, word: $word) === false);
|