PHP-FineDiff
PHP-FineDiff copied to clipboard
Add $insertions_count and $deletions_count.
Add counter to keep track of the number of insertions and deletions. Replacements are considered 1 insertion and 1 deletion.
Example
<?php
$old = 'abc def';
$new = 'hbc ef g';
$diff = new FineDiff($old, $new);
echo $diff->insertions_count; // 2
echo $diff->deletions_count; // 2
Useful. +1