Download the PHP package jblond/php-diff without Composer
On this page you can find all versions of the php package jblond/php-diff. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jblond/php-diff
More information about jblond/php-diff
Files in jblond/php-diff
Package php-diff
Short Description A comprehensive library for generating differences between two hashable objects (strings or arrays).
License BSD-3-Clause
Informations about the package php-diff
PHP Diff Class
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
- Side by Side HTML
- Unified HTML
- Unified Commandline colored output
- JSON
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.
Install
Install for cli support
For cli usage you need to install the suggested jblond/php-cli
package.
Documentation
See the Wiki for
Changelog
Changelog
Example Use
Example Output
File example.php
contains a quick demo and can be found in the example/
directory. Included is a light and a dark theme.
HTML Side By Side Example
More Example Pictures
#### HTML Unified Example ![HTML Unified Example](assets/htmlUnified.png "HTML Unified Example") #### Text Unified Example ![Text Unified Example](assets/textUnified.png "Text Unified Example") #### Text Context Example ![Text Context Example](assets/textContext.png "Text Context Example") #### Text Unified Console Example ![Text Unified Console Example](assets/textUnifiedCli.png "Text Unified Console Example")
HTML Side By Side Dark Theme Example
![HTML Side By Side Dark Theme Example](assets/htmlSidebySideDarkTheme.png "HTML Side By Side Dark Theme Example")
Requirements
- PHP 7.3 or greater
- PHP Multibyte String
- jblond/php-cli (suggested)
Contribution, Issues and feature requests
If you found a bug, or have an idea for new functionality, feel free to report it on the issue tracker - just use search beforehand. Issue tracker
You can also fork this repository and open a PR.
Merge files using jQuery
Xiphe has build a jQuery plugin with that you can merge the compared files. Have a look at jQuery-Merge-for-php-diff .
Todo
- 3 way diff support
Contributors
Contributors since I forked the repo.
License (BSD License)
see License
Tests
All versions of php-diff with dependencies
ext-mbstring Version *
ext-pcre Version *