2017 © Pedro Peláez
 

library diff

Diff helps you generating difference views between two or three text files.

image

martynbiz/diff

Diff helps you generating difference views between two or three text files.

  • Monday, July 6, 2015
  • by martynbiz
  • Repository
  • 2 Watchers
  • 2 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 33 % Grown

The README.md

Diff

Introduction

Engine for performing and rendering text diffs. Basically the old PEAR library but I added 5.3+ namespacing and intend to include a patch method., (*1)

Installation

composer require martynbiz/diff

Usage

// code to highlight the difference between strings
$a_lines = explode("\n", $a);
$b_lines = explode("\n", $b);

$check_diff = new \MartynBiz\Diff\Diff( 'auto', array($a_lines, $b_lines) );

// set which render to use
// $renderer = new \MartynBiz\Diff\Renderer\Unified();
$renderer = new \MartynBiz\Diff\Renderer\Inline();

$diff = $renderer->render($check_diff);

The Versions

06/07 2015

dev-master

9999999-dev http://github.com/martynbiz/diff

Diff helps you generating difference views between two or three text files.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

php diff