slabphp/debug

SlabPHP Debug Library

Installs: 16

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/slabphp/debug

v0.1.0 2018-02-20 00:00 UTC

This package is auto-updated.

Last update: 2025-10-22 08:06:21 UTC


README

The debug library adds a simple interface to collect information for inclusion in the SlabPHP debug toolbar.

Usage

Include this project

composer require slabphp/debug

Benchmarks

You can start and end a benchmark with:

$debug = new \Slab\Debug\Manager();

$debug->startBenchmark('starting up');

// do some stuff

$debug->endBenchmark('starting up');

The results of that benchmark will be returned when you do ->getBenchmarks();

Messages

You can add debug messages with:

$debug->addMessage("Something happened!", "CONTROLLER");

When you do ->getMessages() an entry will be in the "CONTROLLER" context with a timestamp.