PHPackages                             dragontnt/vardumper - 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. dragontnt/vardumper

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

dragontnt/vardumper
===================

Simple var dumper for CLI and HTML compatible with PHP 7.4+

v1.0.0-alpha.1(1y ago)05MITPHP

Since Apr 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/chaungoclong/var-dumper)[ Packagist](https://packagist.org/packages/dragontnt/vardumper)[ RSS](/packages/dragontnt-vardumper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Dumper
======

[](#dumper)

A lightweight PHP dumper for CLI and HTML environments.
Supports PHP 7.4+ and designed for simplicity and readability.

Features
--------

[](#features)

- Dump variables in CLI or HTML format
- Handles scalars, arrays, objects, and nested structures
- Automatically detects environment (CLI or Web)
- PSR-4 autoloading ready
- No external dependencies

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

[](#installation)

```
composer require dragontnt/vardumper
```

Usage
-----

[](#usage)

```
use Dumper\Dumper;

dd($data); // Auto detect and dump to CLI or HTML
```

Example
-------

[](#example)

```
require_once __DIR__ . '/../vendor/autoload.php';

class User
{
    private $id;
    public $name;
    public $email;
    public $role;

    public function __construct($id, $name, $email, $role)
    {
        $this->id = $id;
        $this->name = $name;
        $this->email = $email;
        $this->role = $role;
    }
}

$user1 = new User(101, "John Doe", "john@example.com", "Admin");
$user2 = new User(102, "Jane Smith", "jane@example.com", "Editor");

$settings = [
    "theme" => "dark",
    "notifications" => true,
    "language" => "English",
    "meta" => ["version" => "1.2.3", "lastUpdate" => "2025-04-02"]
];

dd(
    "Hello World!",
    12345,
    true,
    null,
    [1, 2, "test", false],
    ["key1" => "value1", "key2" => 42, "nested" => ["a" => "A", "b" => [10, 20, 30]]],
    $user1,
    $user2,
    $settings,
    new DateTime(),
    new class {
        private $secret = 'hidden';
    }
);
```

API
---

[](#api)

MethodDescription`Dumper::dump()`Dump auto (CLI or HTML)`dd()`Global shortcut for dump + exitRequirements
------------

[](#requirements)

- PHP 7.4 or higher

Contributing
------------

[](#contributing)

Contributions are welcome! Here's how to help:

1. Fork the repository
2. Create a new branch for your feature or fix
3. Write tests if applicable
4. Submit a pull request with a clear description of your changes

Please follow PSR-12 coding standards.
Keep the package lightweight and dependency-free.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance46

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

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

406d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4443792abdd29118d7cb40f4906d98f0ffee1795a0c3fc03ff2bd625cf2a1e9f?d=identicon)[LongTNT](/maintainers/LongTNT)

---

Tags

debugdump

### Embed Badge

![Health badge](/badges/dragontnt-vardumper/health.svg)

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

###  Alternatives

[symfony/var-dumper

Provides mechanisms for walking through any arbitrary PHP variable

7.4k855.5M8.0k](/packages/symfony-var-dumper)[kint-php/kint

Kint - Advanced PHP dumper

2.8k19.3M283](/packages/kint-php-kint)[xrdebug/php

PHP client library for xrDebug

23920.3k2](/packages/xrdebug-php)[leeoniya/dump-r

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

12368.1k5](/packages/leeoniya-dump-r)[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)[phalcon/dd

This package will add the `dd` and `dump` helpers to your Phalcon application.

24294.1k27](/packages/phalcon-dd)

PHPackages © 2026

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