J—P

Currently accepting new projects and available for hire.

My Go-To Debugging Tool for PHP

As a developer who frequently relies on PHP's built-in web server for local development, I've always found myself in need of a debugging tool that is light, fast, and unobtrusive. While there are many powerful debugging tools available, I wanted something that wouldn't interfere with my workflow and would provide clear, readable output with minimal setup.

This led me to create lemmon/cl, a simple PHP console logger designed to make debugging a breeze.

The core of the library is a single function, cl(), which can be used to dump any variable to your server console. It's incredibly easy to use. Just pass a variable to the function, and it will be beautifully formatted in your terminal, courtesy of the powerful symfony/var-dumper component.

Here’s a quick look at how it works:

// Demonstrate cl() with some example data
$exampleData = [
    'string' => 'Hello World',
    'number' => 42,
    'array' => ['apple', 'banana', 'orange'],
    'object' => (object)['name' => 'John', 'age' => 30],
];

cl($exampleData);

This will produce a color-coded, easy-to-read output in your console, allowing you to inspect variables without cluttering your web page.

For me, lemmon/cl has become an indispensable part of my development process. It’s a tool born out of a personal need, and I’m excited to share it with the open-source community.

If you’re looking for a lightweight and elegant debugging solution for your PHP projects, I encourage you to give lemmon/cl a try. You can find it on GitHub and Packagist.

Tablog Svelte

An open-source demo blog application showcasing the Tablo theme built with SvelteKit. Features Markdown processing with mdsvex, Tailwind CSS styling, and modern web development best practices for creating fast, beautiful blogs.

44 3 Svelte

clsx

A tiny PHP library inspired by the popular JavaScript clsx, making it easy to build clean, dynamic class attributes for your HTML. Write neater templates and keep your code readable, no matter how complex your CSS logic gets.

PHP