Skip to content
This repository was archived by the owner on Dec 7, 2018. It is now read-only.

Conversation

@0b10011
Copy link

@0b10011 0b10011 commented Jul 17, 2012

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

@jgutix
Copy link

jgutix commented Jan 29, 2015

Useful. +1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants