franktiao/html-diff
Composer 安装命令:
composer require franktiao/html-diff
包简介
Compare two html text and return a merged html text.(对比两个html文本,返回一个合并差异后的html文本)
README 文档
README
Compare two html text and return a merged html text.
对比两个html文本,返回一个合并差异后的html文本
预览 Preview
安装 Installation
composer require franktiao/html-diff
快速开始 Quick start
use htmlDiff\HtmlDiff;
require __DIR__.'/../vendor/autoload.php';
try {
$diff = new HtmlDiff();
$res = $diff->diff('Some text old', 'Some text new');
} catch (\Exception $e) {
print_r($e->getMessage()); die;
}
print_r($res);
更多使用方式请查看 example 目录
For more usage, please see example directory
更新记录 Update record
- v1.0.0--2020-02-19
A基础版本
- v1.0.1--2020-02-20
F修复了HtmlDiff对象在单例中获取到脏数据的BUG
- v1.0.2--2020-02-20
F修复了单边标签(如img)不会对比的BUGA内置了常用单边标签:img、br、hr、link、mete,不常用的单边标签可调用$htmlDiff->setUnilateralTags()自定义追加
统计信息
- 总下载量: 242
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-02-19