ricardoper / ddumper
Symfony VarDumper With Expanded Dump For All Nodes
v1.2.0
2020-05-11 10:28 UTC
Requires
- php: ^7.2.5
- symfony/var-dumper: ^5.0
This package is auto-updated.
Last update: 2024-10-11 20:24:31 UTC
README
This package has 4 helpers for dump your variables in case of debugging. As a plus, 2 of this helpers dumps your variables in expanded mode.
Requirements
- PHP Version >= 7.2.5
- Symfony VarDumper >= 5.0
Installation
The recommended way to install DDumper is through Composer:
{ "require": { "ricardoper/ddumper": "^1.1" } }
Helpers:
d($var1, $var2, ...)
- Dump vars in colapsed mode by defaultddd($var1, $var2, ...)
- Dump & die vars in colapsed mode by defaultde($var1, $var2, ...)
- Dump vars in expanded mode by defaultdde($var1, $var2, ...)
- Dump & die vars in expanded mode by default
NOTE: In de()
and dde()
helpers, all nodes, subnodes and childs will be showed expanded when rendered.
Examples
ddd()
<?php ddd(true, 1234, 'string', [ 'key1' => 'val1', 'key2' => [ 'l1_key1' => 'l1_val1', 'l1_key2' => 'l1_val2', 'l1_key3' => [ 'l2_key1' => 'l2_val1', 'l2_key2' => 'l2_val2', ], ], ]);
dde()
<?php dde(true, 1234, 'string', [ 'key1' => 'val1', 'key2' => [ 'l1_key1' => 'l1_val1', 'l1_key2' => 'l1_val2', 'l1_key3' => [ 'l2_key1' => 'l2_val1', 'l2_key2' => 'l2_val2', ], ], ]);
License
Released under the MIT License.