PHP-FineDiff icon indicating copy to clipboard operation
PHP-FineDiff copied to clipboard

Add $insertions_count and $deletions_count.

Open 0b10011 opened this issue 12 years ago • 1 comments

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

0b10011 avatar Jul 17 '12 17:07 0b10011

Useful. +1

jgutix avatar Jan 29 '15 20:01 jgutix