PHPackages                             aronduby/dump - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. aronduby/dump

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

aronduby/dump
=============

D::ump - a PHP 5.4 print\_r/var\_dump replacement base on Krumo

0.9.1(9y ago)41.1M↓26.8%1[2 issues](https://github.com/aronduby/dump/issues)PHPPHP &gt;=5.3

Since Apr 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aronduby/dump)[ Packagist](https://packagist.org/packages/aronduby/dump)[ RSS](/packages/aronduby-dump/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

D::ump
======

[](#dump)

A `print_r`/`var_dump` replacement for PHP &gt;= 5.4.0 based on [Krumo](http://krumo.sourceforge.net/) and the [oodle/krumo](https://github.com/oodle/krumo) fork.

[![D::ump screenshot](https://camo.githubusercontent.com/619e83b46bc506b1e54a04db769427758fa0a0411cdb614a58b8db84053c38a7/68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d3042386f716f705f564b6d736f6557464665574a565533646d62484d "D::ump screenshot")](https://camo.githubusercontent.com/619e83b46bc506b1e54a04db769427758fa0a0411cdb614a58b8db84053c38a7/68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d766965772669643d3042386f716f705f564b6d736f6557464665574a565533646d62484d)

Differences from Krumo
----------------------

[](#differences-from-krumo)

- *modified* HTML, CSS, and JS has been completely reworked, makes multiple arguments passed look like they're together
- *added* Passing in bitmask to be able to do Titles, Output Buffering, and Stopping Executing after output
- *added* Object Reflection to not only show the properties (which are now sorted as arrays) but also:
    - Parent Class Name
    - Interface Names
    - Trait Names
    - Constants
    - Methods (with the argument list and defaults\*)
- *added* Callables are now first class citizens instead of strings, complete with argument list and defaults\* from reflection
- *removed* All the different skins, if you *really* want it to look different there's a `css_file` [config](#config) option, but who cares, its development
- *removed* All the helper functions, because why not just type `D::ump($_ENV)`, not like your going to remember them all anyway
- *removed* .ini settings file is gone, use [`D::config()`](#config) if you want to set global changes
- probably some other things...

***Note:*** reflection can't get the default values for arguments of built-in methods/functions, it will display the argument name with a note in these circumstances

Install
-------

[](#install)

### Using [Composer](http://getcomposer.org)

[](#using-composer)

```
{
	"require": {
		"aronduby/dump" : "*"
	}
}
```

then run `composer install` or `composer update`

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
D::ump($arg1);
```

You can also pass multiple arguments:

```
D::ump($arg1, $arg2, $arg3);
```

### Dump Settings

[](#dump-settings)

If you pass an instance of `D\DumpSettings` as the last argument to `D::ump` you can set a title, output buffer the return, kill the process after returning, and expand all the collapsibles by default.

```
$ds = new \D\DumpSettings(D::KILL | D::EXPAND, 'This is a Title');
D::ump($arg1, $arg2, $ds);
```

#### Short Cut:

[](#short-cut)

The `D` object has a shortcut to quickly create and return an instance of `D\DumpSettings`, so the same example could be rewritten as

```
D::ump($arg1, $arg2, D::S(D::KILL | D::EXPAND, 'This is a Title'));
```

#### Flags

[](#flags)

The following flags are available as constants of the `D` class:

- **D::KILL** -- will call die() after output
- **D::OB** -- will use the output buffer and return the output instead of printing it
- **D::EXPAND** -- starts with the output fully expanded
- **D::IGNORE\_CLI** -- by default, if the script detects you are running command line it just uses `print_r`, use this to include the full output, useful if you are doing html logging

***Note:*** Passing a bitmask containing both `D::KILL` and `D::OB` will result in an `InvalidArgumentException` being thrown since you can't do both ***Note:*** `D\DumpSettings` also has a backtrace property which is used by `D::ump()`

Config
------

[](#config)

You can globally modify the following properties by passing an associative array into `D::config($arr)` with the following values

KeyTypeDefaultDescription**enabled**Booleantrueglobally enabled/disable output, can also call `D::disable` &amp; `D::enable`**css\_file**Stringnullpath to a custom CSS file, file will be read in using `file_get_contents`, should be absolute path**display.separator**String=&gt;string to use as a separator between the key/values (the default is wrapped in spaces)**display.truncate\_length**Integer80If a string is longer than X characters it will be truncated with the non-truncated version displaying as a collapsible**display.cascade**ArraynullArray of integers to determine when a level should collapse. If the specified level has greater than X amount of element it shows collapsed. `display.cascade=>[5,10]` will expand the first level if there are 5 or less items and the second level with 10 or less. Set to null to have everything collapse**display.show\_version**BooleantrueInclude version # and link in the footer of the output**display.show\_call\_info**BooleantrueInclude the file/line # D was called from**display.replace\_returns**BooleanfalseShould we replace returns `\n` with br's in the output**sorting.arrays**BooleantrueReorder associative arrays (and object properties and methods) based on their keys### Example

[](#example)

```
D::config([
	'css_file' => "absolute/path/to/your/custom/css/file.css",
	'display.cascade' => [5, 10],
	'sorting.arrays' => false
]);
// ... some other stuff in your code
D::ump($arg1);
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~910 days

Total

2

Last Release

3518d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d816e65aa6b55b39549f8bd8fdd4c7ad05e0d98117b699b03d6586aa8b938ec6?d=identicon)[aronduby](/maintainers/aronduby)

---

Top Contributors

[![aronduby](https://avatars.githubusercontent.com/u/650070?v=4)](https://github.com/aronduby "aronduby (19 commits)")

---

Tags

debugdumpdebuggingprettyprintprint\_rvar\_dumpkrumo

### Embed Badge

![Health badge](/badges/aronduby-dump/health.svg)

```
[![Health](https://phpackages.com/badges/aronduby-dump/health.svg)](https://phpackages.com/packages/aronduby-dump)
```

###  Alternatives

[jbzoo/jbdump

Script for debug and dump PHP variables and other stuff. This tool is a nice replacement for print\_r() and var\_dump() functions.

211.1M3](/packages/jbzoo-jbdump)[mmucklo/krumo

KRUMO - version 2.0 of print\_r(); and var\_dump(); (with new updates)

89168.0k6](/packages/mmucklo-krumo)[leeoniya/dump-r

a cleaner, leaner mix of print\_r() and var\_dump()

12368.1k5](/packages/leeoniya-dump-r)[kktsvetkov/krumo

Krumo is a debugging tool, which displays structured information about any PHP variable. It is a nice replacement for print\_r() or var\_dump() which are used by a lot of PHP developers.

8260.7k](/packages/kktsvetkov-krumo)[xrdebug/php

PHP client library for xrDebug

23920.3k2](/packages/xrdebug-php)[ivoba/stop

nice output for debug functions for PHP 5.3

1041.9k5](/packages/ivoba-stop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
