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).
To use CoolDump, first add it to your project:
composer require wordcoolframework/cool-dumpuse CoolDump\CoolDump;
$debugger = new CoolDump();
$debugger->wc(["name" => "Arash narimani", "age" => 23]);Displays data in either a web or CLI environment and stops script execution.
wc(["name" => "Arash narimani", "age" => 23]);Displays data in JSON output.
wcJson(["name" => "Arash narimani", "age" => 23]);✅ 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
Processes data as HTML for browser display.
Processes data as text for terminal display.
Extracts and displays the code snippet related to the wc execution location.
Returns a random quote about programming and debugging.
Checks whether the script is running in a web or CLI environment.
Determines the data type.
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! 🎯