A tiny console logger I made for local PHP development

I spend a lot of time building Kirby sites—and other projects—locally with PHP’s built-in server, and I wanted a way to dump variables without messing up the browser response. So I made a tiny helper called cl(), powered by Symfony VarDumper, that sends dumps straight to the terminal (stdout) instead of the page. It’s not a Kirby plugin and not tied to Kirby in any way—you can drop it into any PHP project—but I use it heavily during local Kirby CMS development. Think of it as a quick, minimalistic “dump-to-console and continue,” not a full-blown debugger replacement.

I like it because it keeps browser output clean, gives me colorful and structured dumps, and doesn’t block execution. Just call cl($whatever) and keep going.

Install (dev-only):

composer require lemmon/cl --dev

Use anywhere after Composer autoload:

cl($page);
cl($kirby->request());
cl($someDeepArray);

Repo: lemmon/cl

Cheers! :waving_hand: Feedback welcome.

4 Likes