php-extended/polyfill-str-levenshtein

A php implementation of the levenshtein distance without length limitation

1.4.6 2024-07-31 13:28 UTC

README

A php implementation of the levenshtein distance without length limitations.

coverage build status

Installation

The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.

  • Download composer.phar from their website.
  • Then run the following command to install this library as dependency :
  • php composer.phar php-extended/polyfill-str-levenshtein": "^1"

Basic Usage

This library gives the function str_levenshtein(?string $str1, ?string $str2) : int :


$distance = \str_levenshtein('toto', 'tata');
// $distance is 2

License

MIT (See license file).