[sebastian/diff]内容比较库,比较两段文本的历史变化

2022-04-03 奥古斯宏

sebastian/diff是一个用于对比两段文本变化的库,就像git的那样功能一样,可以用来对比文件变化。

使用方法非常简单:

<?php
use SebastianBergmann\Diff\Differ;

$differ = new Differ;
print $differ->diff('foo', 'bar');

最终输入效果如下:


还支持一些配置项,比如自定义头部,显示行号,很实用。

最近浏览
IP用户:223.109.*.*
1 小时前 Sogou Spider
IP用户:54.38.*.*
9 小时前 aHrefs Bot
IP用户:66.249.*.*
18 小时前 Googlebot
IP用户:195.178.*.*
3 天前 Firefox Windows 7
IP用户:195.178.*.*
3 天前 Firefox Windows 7
IP用户:116.179.*.*
4 天前 Baidu Spider
IP用户:198.244.*.*
5 天前 aHrefs Bot
IP用户:195.178.*.*
5 天前 Firefox Windows 7
IP用户:3.19.*.*
5 天前 Firefox GNU/Linux
IP用户:27.187.*.*
7 天前 Brave Mac 10.15
IP用户:123.55.*.*
8 天前 Chrome Mac 10.12
IP用户:66.249.*.*
8 天前 Googlebot
累计浏览次数:2190
评论
点击登录
phpreturn,PHP武器库,专注PHP领域的项目和资讯,收录和介绍PHP相关项目。
最近浏览 点击登录
累计浏览次数:283987
一周浏览次数:2072
今日浏览次数:290

本站所有权利归 phpreturn.com 所有

举报/反馈/投稿邮箱:phpreturn@ulthon.com

鲁ICP备19027671号-2