定制 kipras/array-diff-html 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kipras/array-diff-html

Composer 安装命令:

composer require kipras/array-diff-html

包简介

PHP class for pretty-printing the difference between two arrays/objects

README 文档

README

PHP class for pretty-printing the difference between two arrays/objects using HTML, CSS and JavaScript, providing buttons to expand/collapse each level.

Example screenshot:
ArrayDiffHtml screenshot

Any objects found along the way are converted to arrays, in one of these ways (they are tried in this order):

  • If a global function toArray() exists - that function is called and the result of it is used for comparison
  • If the object has a method _toArray() - that method is called and the result of it is used for comparison
  • Otherwise get_object_vars() is called to retrieve data from the object

Usage

  • ArrayDiffHtml::diff($first, $second, [$strictEquality], [$opt])

    Options can be passed as an associative array in the $opt parameter.
    Available options:

    • title1: Title of the $first1 array (default = 'First')
    • title2: Title of the $second array (default = 'Second')
    • noSecond: If there is no second array (we are only printing the contents of the first array and no comparison should be done) - this should be set to True. (default = False)

Requirements

  • PHP >= 5.3 (uses static:: keyword)

统计信息

  • 总下载量: 71
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固