Skip to content
Gitea edited this page Oct 29, 2021 · 3 revisions

PHP-Diff

Introduction

A comprehensive library for generating differences between two hashable objects (strings or arrays). Generated differences can be rendered in all the standard formats including:

  • Unified
  • Context
  • Inline HTML
  • Side by Side HTML
  • Unified HTML
  • Unified Commandline colored output

The logic behind the core of the diff engine (ie, the sequence matcher) is primarily based on the Python difflib package. The reason for doing so is primarily because of its high degree of accuracy.

Requirements

Issues and feature requests

If you've found a bug or have an idea for new functionality, feel free to report it on the Issue Tracker. Just search upfront for any related issues.

Output Examples

HTML Side By Side

HTML Side By Side

HTML Side By Side Dark Theme

HTML Side By Side Dark Theme

HTML Inline

HTML Inline

HTML Unified

HTML Unified

Text Unified

Text Unified

Text Context

Text Context

Console Unified

Console Unified