Download the PHP package yusitnikov/php-diff without Composer
On this page you can find all versions of the php package yusitnikov/php-diff. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package php-diff
php-diff
Text diff library for PHP
Installation
Usage
Create an instance of LevenshteinDiffCalculator
. Arguments:
string $separatorRegex
- separator RegEx that will split the strings into units. By default, strings will be split into letters.OperationCostCalculator $operationCostCalculator
- specify it to apply custom operation costs. By default, the cost for each operation (insert, delete, replace) will be 1.StringDiffCalculatorInterface $itemDiffCalculator
- diff calculator that would be applied when replacing a unit.
Example 1. Simple use-case - calculate distance and diff letter by letter.
Output:
The corresponding diff:
Example 2. Complex differ - compare lines and words
All versions of php-diff with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.0|^8.0
The package yusitnikov/php-diff contains the following files
Loading the files please wait ....