PHPackages                             sigjlr/phpsimpleprofiler - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. sigjlr/phpsimpleprofiler

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

sigjlr/phpsimpleprofiler
========================

Lightweight php profiler library

020PHP

Since Nov 7Pushed 12y ago1 watchersCompare

[ Source](https://github.com/sigjlr/PhpSimpleProfiler)[ Packagist](https://packagist.org/packages/sigjlr/phpsimpleprofiler)[ RSS](/packages/sigjlr-phpsimpleprofiler/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PhpSimpleProfiler
=================

[](#phpsimpleprofiler)

Lightweight php profiler library

\##Install You may install the PhpSimpleProfiler with [Composer](http://getcomposer.org/) (recommended) or manually.

\##Usage This example assumes you are autoloading dependencies using Composer or any other [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) compliant autoloader.

PhpSimpleProfiler available method:

- setOption($name , $value) Set the option (if $name is a valid option name) value with the desidered one. Available option : 'active' (bool) (default = true) If setted to false no profile will recorded 'handler' (PhpSimpleProfiler\\Handler\\IHandler) (default = PhpSimpleProfiler\\HandlerStreamHandler) The object that manipulate and return the data 'realUsage' (bool) (default = false) Set it to TRUE to get the real size of memory allocated from system (all the memory used by the engine php), set it to FALSE to get only the memory used by emalloc() (only script)
- add($message) Add an entry to the statistical profile.
- stop() Ends the profiler.
- printData() Gets the data.

\###Handlers

- StreamHandler This handler is intended to print profile data in a log file
- HTMLHandler This handler is intended to show data into a web page

\###Example

```
// Create a new PhpSimpleProfiler
$psp = new PhpSimpleProfiler\PhpSimpleProfiler(array('realUsage' =>true));

// Add profiled entry
$psp->add('Before loop');

$y = 0;
for($i = 0; $iadd('After loop');

// Stop the profiler
$psp->stop();

// Print the result
echo $psp->printData();

// You shold see something like this:
/*
Time: 1380207924 | Memory Usage: 0.75 MB | execution_time: 1.4066696166992E-5 | Info: Initial state
Time: 1380207924 | Memory Usage: 0.75 MB | execution_time: 0.00024199485778809 | Info: Before loop
Time: 1380207924 | Memory Usage: 0.75 MB | execution_time: 0.00027799606323242 | Info: After loop
Time: 1380207924 | Memory Usage: 0.75 MB | execution_time: 1.6927719116211E-5 | Info: Final state

Peak of memory usage: 0.75 MB

CPU elaboration time: 0.00055694580078125
*/
```

\##License The PhpSimpleProfiler is released under the MIT public license

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/211db8e9c4ca1b9697fc1ca8b50631aa3ff203254c9be658dd7edb6d26ddaae3?d=identicon)[sigjlr](/maintainers/sigjlr)

---

Top Contributors

[![sigjlr](https://avatars.githubusercontent.com/u/5195951?v=4)](https://github.com/sigjlr "sigjlr (8 commits)")

### Embed Badge

![Health badge](/badges/sigjlr-phpsimpleprofiler/health.svg)

```
[![Health](https://phpackages.com/badges/sigjlr-phpsimpleprofiler/health.svg)](https://phpackages.com/packages/sigjlr-phpsimpleprofiler)
```

###  Alternatives

[symfony/stopwatch

Provides a way to profile code

2.8k387.2M918](/packages/symfony-stopwatch)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.1k662.9k29](/packages/fruitcake-laravel-debugbar)[spatie/ignition

A beautiful error page for PHP applications.

510147.6M69](/packages/spatie-ignition)[jokkedk/webgrind

Webgrind is a Xdebug profiling web frontend in PHP5. It implements a subset of the features of kcachegrind and installs in seconds and works on all platforms. For quick'n'dirty optimizations it does the job.

3.3k193.0k](/packages/jokkedk-webgrind)[koriym/printo

An object graph visualizer.

1421.8M2](/packages/koriym-printo)[soloterm/dumps

A Laravel command to intercept dumps from your Laravel application.

125285.7k3](/packages/soloterm-dumps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
