PHPackages                             cruxoft/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cruxoft/dump

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cruxoft/dump
============

A system for generating structure information about nested variables for use including screen display

0.4.0(7mo ago)11379Apache-2.0PHPPHP ^8.1

Since Feb 15Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/irwtdvoys/dump)[ Packagist](https://packagist.org/packages/cruxoft/dump)[ RSS](/packages/cruxoft-dump/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (11)Used By (9)

Dump (0.4.0)
============

[](#dump-040)

What is it?
-----------

[](#what-is-it)

An alternative to `var_dump` or `print_r` for generating structure information about variables to then be output.

Installation
------------

[](#installation)

Can be installed using composer by running the following:

```
$ composer require cruxoft/dump
```

Usage
-----

[](#usage)

For details on full basic usage and more complex examples see the `examples/` folder.

### Output Function

[](#output-function)

Some simple output based usage examples of the built in `dump()` function would be as follows:

```
use function Cruxoft\dump;

dump(array("one", "two", 3));
dump(true);
dump("Hello World");
```

Which would output:

```
array(3):
(
    [0] string(3): "one"
    [1] string(3): "two"
    [2] integer: 3
)
boolean: true
string(11): "Hello World"

```

The `dump` method can take an optional `options` parameter as a bitwise value of the required options. Available options are:

- **INCLUDE\_LOCATION**: Gives the file and line number of the `dump` call.
- **RELATIVE\_PATHS**: Sets paths to be relative to the project root. Requires `CRUXOFT_ROOT` constant to be set.
- **DIE\_AFTER**: Calls `die()` after the `dump` method has completed.

```
use Cruxoft\Dump\Options;
use function Cruxoft\dump;

dump("Hello World", Options::INCLUDE_LOCATION);
```

```
examples/file.php@4
string(11): "Hello World"

```

Development
-----------

[](#development)

### Docker

[](#docker)

If your local environment does not have an upto date version of PHP installed there is a docker environment is included in the codebase for quickly building a development/testing environment.

Your installed PHP version can be found with the following command:

```
$ php -v

PHP 8.0.7 (cli) (built: Jun 23 2021 12:34:03) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.7, Copyright (c) Zend Technologies
```

It uses the latest PHP8 FPM image with composer added and can be built and entered:

```
$ cd docker
$ docker-compose -p dump up -d
$ docker exec -it dump_php_1 bash
```

The container can be torn down with:

```
$ docker-compose stop
```

Road Map
--------

[](#road-map)

- Ability to specify formatting parameters for output of dump function
- Additional built-in conversions of structure data (json, xml, etc)
- Coloured output

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance65

Regular maintenance activity

Popularity12

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~406 days

Recently: every ~705 days

Total

8

Last Release

211d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/984365c8e13e63090196a89eca25d781bb2abd1a2c43f6dbe5cc62d0b8a65d80?d=identicon)[irwtdvoys](/maintainers/irwtdvoys)

---

Top Contributors

[![irwtdvoys](https://avatars.githubusercontent.com/u/1695516?v=4)](https://github.com/irwtdvoys "irwtdvoys (72 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[vespakoen/menu

Managing menus the easy way.

27187.0k5](/packages/vespakoen-menu)

PHPackages © 2026

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