PHP Classes

File: readme.md

Recommend this page to a friend!
  Classes of mohammad anzawi   PHP Similarity Between Two Strings   readme.md   Download  
File: readme.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Similarity Between Two Strings
Calculate the similarity level of two text strings
Author: By
Last change:
Date: 2 years ago
Size: 1,083 bytes
 

Contents

Class file image Download

find-diff

calculate levenshtein distances & hamming distances between 2 strings using PHP

please note : PHP provided build-in functions to do what this library do it's just for fun !

levenshtein function

gmp_hamdist function

main Classes located in (/libs/) directory

installation

  • open your `terminal`/`cmd`/`powershell`
  • navigate to your projects directory
  • run `git clone https://github.com/anzawi/find-diff.git`
  • navigate to project `cd find-diff`
  • run `composer install`

this project require find-diff as a library check composer.json file and take a look on repositories section.

run test in command-line

  • open your `terminal`/`cmd`/`powershell`
  • navigate to project directory
  • run `php runTest --s1="Mohammad" --s2="Mohammed"`

run test project

  • run any preferred php server
  • navigate to project
  • you will see a simple form
  • start testing

don't forget to run test using phpunit ./vendor/bin/phpunit