PHPackages                             topvisor/horde-text-diff - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. topvisor/horde-text-diff

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

topvisor/horde-text-diff
========================

Text diff generation and rendering library

v3.0.7(3mo ago)0785LGPL-2.1-onlyPHPPHP ^8.2

Since Jan 12Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/topvisor/horde-text-diff)[ Packagist](https://packagist.org/packages/topvisor/horde-text-diff)[ Docs](https://github.com/topvisor/horde-text-diff)[ RSS](/packages/topvisor-horde-text-diff/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (9)Used By (0)

hord-text-diff
==============

[](#hord-text-diff)

A text-based diff engine and renderers for multiple diff output formats

Based on project [https://github.com/horde/Text\_Diff](https://github.com/horde/Text_Diff) alpha fork no production version and has been ready to production use with support InlineRenderer.

Why exactly current version lib?
================================

[](#why-exactly-current-version-lib)

- The most relevant on 2024-01-01
- Support php 8.3
- PSR-4
- Fixed some bugs

Why Text diff by Horde?
=======================

[](#why-text-diff-by-horde)

Is the best lib for text diff in php. Is wise and experienced.

Advantages over analogues:

- diff by word inner each line
- diff by symbols inner each line
- tuning the output format
- the best speed in php
- the bets memory optimization in php

Optimiztions
============

[](#optimiztions)

For very long strings, there is a trick: divide long strings before use diff

Examples
========

[](#examples)

```
use Topvisor\Horde\Text\Diff;

$diff = Diff\Diff::fromFileLineArrays($linesA, $linesB);

// calc diff as word
$renderer = new Diff\InlineRenderer();
$res = $renderer->render($diff);
var_dump($res);

// calc diff as symbol
$renderer = new Topvisor\Horde\Text\Diff\InlineRenderer(['split_characters' => true]);
$res2 = $renderer->render($diff);
var_dump($res2);
```

License
=======

[](#license)

See: [https://github.com/horde/Text\_Diff/](https://github.com/horde/Text_Diff/)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance78

Regular maintenance activity

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~106 days

Recently: every ~185 days

Total

8

Last Release

117d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/59361374?v=4)[Topvisor LLC](/maintainers/topvisor)[@topvisor](https://github.com/topvisor)

---

Top Contributors

[![Artemeey](https://avatars.githubusercontent.com/u/4234863?v=4)](https://github.com/Artemeey "Artemeey (20 commits)")[![dmitriy-prokoshev](https://avatars.githubusercontent.com/u/173471052?v=4)](https://github.com/dmitriy-prokoshev "dmitriy-prokoshev (1 commits)")

### Embed Badge

![Health badge](/badges/topvisor-horde-text-diff/health.svg)

```
[![Health](https://phpackages.com/badges/topvisor-horde-text-diff/health.svg)](https://phpackages.com/packages/topvisor-horde-text-diff)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
