PHP Classes

File: src/SimilarStringFinderExample.php

Recommend this page to a friend!
  Classes of Smoren Freelight   PHP Similar Strings Finder   src/SimilarStringFinderExample.php   Download  
File: src/SimilarStringFinderExample.php
Role: Example script
Content type: text/plain
Description: Example script as a class
Class: PHP Similar Strings Finder
Search a string for a given text or similar text
Author: By
Last change:
Date: 4 months ago
Size: 602 bytes
 

Contents

Class file image Download
<?php


namespace Smoren\SimilarStringFinder;


class
SimilarStringFinderExample extends SimilarStringFinder
{
    public function
__construct()
    {
       
parent::__construct();

       
$this->addStrings('????', ['????', '??????']);
       
$this->addStrings('????', ['????', '??????']);
    }

    public static function
test()
    {
       
$inst = new static();
        echo
"??????? => " . $inst->find('???????', -1, $accuracy) . " (accuracy: {$accuracy})" . "\n";
        echo
"???????? => " . $inst->find('????????') . "\n";
    }
}