PHPackages                             wordcoolframework/cool-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. wordcoolframework/cool-dump

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

wordcoolframework/cool-dump
===========================

CoolDump is Debug Tool

1.1.0(1y ago)26MITPHPPHP &gt;=8.0

Since Feb 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wordcoolframework/CoolDump)[ Packagist](https://packagist.org/packages/wordcoolframework/cool-dump)[ RSS](/packages/wordcoolframework-cool-dump/feed)WikiDiscussions main Synced today

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

CoolDump
========

[](#cooldump)

CoolDump is a tool for beautifully and understandably displaying data in both web and CLI environments. This class enables rendering arrays, objects, and various values in both environments (browser and terminal).

📦 Installation &amp; Usage
--------------------------

[](#-installation--usage)

### Installation

[](#installation)

To use CoolDump, first add it to your project:

```
composer require wordcoolframework/cool-dump
```

### Usage in Project

[](#usage-in-project)

```
use CoolDump\CoolDump;

$debugger = new CoolDump();
$debugger->wc(["name" => "Arash narimani", "age" => 23]);
```

🚀 Main Functions
----------------

[](#-main-functions)

### `wc(...$data)`

[](#wcdata)

Displays data in either a web or CLI environment and stops script execution.

```
wc(["name" => "Arash narimani", "age" => 23]);
```

### `wcJson(...$data)`

[](#wcjsondata)

Displays data in JSON output.

```
wcJson(["name" => "Arash narimani", "age" => 23]);
```

🎯 Features
----------

[](#-features)

✅ Automatic execution environment detection (CLI or web)
✅ Categorized data display
✅ Support for various data types
✅ Debug information including:

- ⏳ Execution time
- 📌 Memory usage
- 🔍 Code snippet from the execution location

🔧 Implementation Details
------------------------

[](#-implementation-details)

### `renderHtml($data, $level)`

[](#renderhtmldata-level)

Processes data as HTML for browser display.

### `renderCli($data, $level)`

[](#renderclidata-level)

Processes data as text for terminal display.

### `getCodeSnippet($file, $line, $padding = 5)`

[](#getcodesnippetfile-line-padding--5)

Extracts and displays the code snippet related to the `wc` execution location.

### `getFunQuote()`

[](#getfunquote)

Returns a random quote about programming and debugging.

🛠 Helper Functions
------------------

[](#-helper-functions)

### `isWeb()`

[](#isweb)

Checks whether the script is running in a web or CLI environment.

### `getType($value)`

[](#gettypevalue)

Determines the data type.

🌍 Global Helper Functions
-------------------------

[](#-global-helper-functions)

`wc()` and `wcJson()` are globally defined helper functions that can be used anywhere in the project without instantiating a class.

---

🚀 **CoolDump** – A better and faster debugging tool! 🎯

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance42

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

2

Last Release

480d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/180386151?v=4)[WordCool Ecosystem](/maintainers/wordcoolframework)[@wordcoolframework](https://github.com/wordcoolframework)

---

Top Contributors

[![wordcoolframework](https://avatars.githubusercontent.com/u/180386151?v=4)](https://github.com/wordcoolframework "wordcoolframework (8 commits)")

---

Tags

wtfcool dumpcool dumper

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[fjogeleit/prometheus-messenger-middleware

Prometheus Middleware for the Symfony Messenger Component

2255.2k](/packages/fjogeleit-prometheus-messenger-middleware)[spatie/craft-ray

Easily debug CraftCMS projects

1638.6k](/packages/spatie-craft-ray)

PHPackages © 2026

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