PHPackages                             lemmon/cl - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. lemmon/cl

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

lemmon/cl
=========

Console logger for PHP that dumps cleanly to stdout, keeping HTTP responses intact while showing rich variable details.

v2.0.0(2w ago)1190—6.7%MITPHPPHP &gt;=8.4

Since May 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/lemmon/cl)[ Packagist](https://packagist.org/packages/lemmon/cl)[ Docs](https://github.com/lemmon/cl)[ RSS](/packages/lemmon-cl/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (8)Versions (7)Used By (0)

CL - Simple PHP Console Logger
==============================

[](#cl---simple-php-console-logger)

A simple PHP console logger for local development and debugging, providing beautiful and detailed variable inspection. Particularly useful when working with PHP's built-in development server. During HTTP requests, dumps are automatically redirected to stdout, keeping your responses clean while still providing detailed debugging information.

[![CL Console Output](assets/screenshot.png)](assets/screenshot.png)

Why use CL?
-----------

[](#why-use-cl)

- **Clean HTTP Responses:** Unlike `var_dump()` or `print_r()`, `cl()` sends its output directly to your terminal (stdout), ensuring your browser's HTTP response remains clean and unaffected. This is invaluable when debugging APIs, JSON responses, or simply keeping your HTML output pristine.
- **Detailed &amp; Beautiful Output:** Leveraging Symfony's VarDumper component, `cl()` provides highly detailed, syntax-highlighted, and easily readable dumps of any PHP variable type, from simple strings to complex objects and arrays.
- **Non-Blocking Execution:** `cl()` dumps the variable and allows your script to continue execution, unlike `dd()` (dump and die) functions that terminate the script immediately.
- **Lightweight &amp; Zero Configuration:** Just install and use. No complex setup or configuration files needed.
- **Framework Agnostic:** Works in any PHP project, regardless of the framework you're using.

Note

`cl` is a lightweight "dump-and-continue" helper for quick inspections, whereas Xdebug handles step-debugging, profiling, and coverage -- reach for the one that fits the task.

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

[](#installation)

```
composer require lemmon/cl --dev
```

Tip

Install the package as a dev dependency (`composer require --dev`) so production builds stay lean.

Usage
-----

[](#usage)

```
