text-matcher Документация на русском языке Installation composer require labile/text-matcher A simple string comparison library <?php declare(strict_types=1); use Astaroth\TextMatcher; $textMatcher = new TextMatcher("i love Katya", "love", TextMatcher::CONTAINS); if ($textMatcher->compare()){ //... }