php-packages/dumpy
最新稳定版本:1.0.2
Composer 安装命令:
composer require php-packages/dumpy
包简介
Better var_dump for PHP.
README 文档
README
Better var_dump for PHP.
Features
- pretty configurable (one-configuration-per-instance)
- fully tested (PHPUnit as a test runner + Essence as BDD assertion framework)
- documented (comments in source code + this readme file)
- decent source code, unlike many solutions I've seen previously
Installation
composer require php-packages/dumpy
Usage
It's pretty darn simple.
Configuration
$dumpy = new PhpPackages\Dumpy\Dumpy; $dumpy->configure("optionName", "optionValue"); $dumpy->getConfigOption("optionName"); # => "optionValue"
| Option name | Description | Possible values |
|---|---|---|
| str_max_length | the maximum string length | any positive integer |
| bool_lowercase | either FALSE or false |
either false or true |
| null_lowercase | either NULL or null |
either false or true |
| round_double | whether to round() doubles to given decimal point |
false or any positive integer |
| replace_newline | whether to replace PHP_EOL with \\n |
either false or true |
| array_max_elements | a treshold - all odd elements with be replaced with a single ... |
any positive integer |
| array_indenting | an indentation sequence | any string (e.g., ) |
| object_limited_info | whether to display parent classes, interfaces, traits | either false or true |
Dumping
$dumpy = new PhpPackages\Dumpy\Dumpy; // Configure Dumpy... $stringRepresentation = $dumpy->dump($anyValue);
License
The MIT license (MIT).
统计信息
- 总下载量: 201
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-22