htmldiff:比较两个 HTML 字符串

时间:2021-06-12 12:12:31
【文件属性】:
文件名称:htmldiff:比较两个 HTML 字符串
文件大小:9KB
文件格式:ZIP
更新时间:2021-06-12 12:12:31
PHP html差异 比较两个 HTML 字符串。 该库将 HTML 转换为可以使用 Git 或 Linux 中的算法(比较整行代码)进行区分的形式,以实现更高的准确性,然后将其解码回有效的 HTML。 要求 PHP 5.3.0 或更高版本 PHP 的扩展 安装 将 Htmldiff 添加到您的composer.json文件中: " require " : { " gathercontent/htmldiff " : " 0.2.* " } 获取 composer 安装包: $ composer update gathercontent/htmldiff 用法 输入将在差异之前由 Tidy 解析。 下面是几个例子: $ old = 'This is a string' ; $ new = 'This is a text' ;
【文件预览】:
htmldiff-master
----src()
--------GatherContent()
----.travis.yml(111B)
----LICENSE(1KB)
----phpunit.xml(552B)
----README.md(2KB)
----tests()
--------HtmldiffTest.php(13KB)
----.gitignore(47B)
----composer.json(743B)

网友评论