PHPackages                             glider88/php-dumper - 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. glider88/php-dumper

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

glider88/php-dumper
===================

Dump php values as valid php values

1.0.0(5mo ago)013MITPHPPHP ^8.1

Since Dec 7Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/Glider88/php-dumper)[ Packagist](https://packagist.org/packages/glider88/php-dumper)[ Docs](https://github.com/Glider88/php-dumper)[ RSS](/packages/glider88-php-dumper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHP Dumper
==========

[](#php-dumper)

Dump php variable as valid php code.

Installation:

```
composer require glider88/php-dumper
```

Start:

```
bin/re  # first run
```

```
bin/up  # start app
```

```
bin/unit # run tests
```

Values:

```
[1, 's', null, false];

[['a' => 'b', [], 'b' => 'c'];

new SomeClass(prop1: 'one', prop2: 12);
```

Dump to:

```
"[1, 's', null, false]";

"[
  'a' => 'b',
  0 => [],
  'b' => 'c',
]";

"Dumper::object(
  'SomeClass',
  [
    'prop1' => 'one',
    'prop2' => 12,
  ]
)";
```

Limitations:

- resources are replaced as 'RESOURCE'
- Closures as PhpDumper::void()

For recursive objects or complex data use:

```
PhpDumper::dump()
```

This dump saves data to a file, and once the file is required, you can get data in variable `$result_`

It is possible to add your own data hooks:

```
$hooks = [
    [
        static fn($var) => $var instanceof LaravelModel,
        static fn(LaravelModel $m) => '\\' . $m::class . "::find($m->id)",
    ],
];

PhpDumper::dd([1, LaravelModel::find(1), true], $hooks);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance71

Regular maintenance activity

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

162d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7103e36446ad2fc58a3da730afd7d0c5a0b89b01a231dbd537832030bd8cadd7?d=identicon)[Glider88](/maintainers/Glider88)

---

Top Contributors

[![Glider88](https://avatars.githubusercontent.com/u/1173406?v=4)](https://github.com/Glider88 "Glider88 (1 commits)")

---

Tags

phpdumper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/glider88-php-dumper/health.svg)

```
[![Health](https://phpackages.com/badges/glider88-php-dumper/health.svg)](https://phpackages.com/packages/glider88-php-dumper)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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