PHPackages                             iffifan/laravel-debugbar-memory - 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. iffifan/laravel-debugbar-memory

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

iffifan/laravel-debugbar-memory
===============================

Add detailed memory usage measurement for code blocks in laravel debugbar

23952[1 issues](https://github.com/iffifan/laravel-debugbar-memory/issues)[1 PRs](https://github.com/iffifan/laravel-debugbar-memory/pulls)PHP

Since Dec 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/iffifan/laravel-debugbar-memory)[ Packagist](https://packagist.org/packages/iffifan/laravel-debugbar-memory)[ RSS](/packages/iffifan-laravel-debugbar-memory/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-debugbar-memory
=======================

[](#laravel-debugbar-memory)

[![License](https://camo.githubusercontent.com/8c4d9750a48b79da510b24cf6c6fe2a8f3a5c1c5ebb70a829d9d955dc1c07e17/68747470733a2f2f706f7365722e707567782e6f72672f6966666966616e2f6c61726176656c2d64656275676261722d6d656d6f72792f6c6963656e7365)](https://packagist.org/packages/iffifan/laravel-debugbar-memory)

Add detailed memory usage measurement for code blocks in [Laravel Debugbar](https://github.com/barryvdh/laravel-debugbar)

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

[](#installation)

Require this package with composer. It is recommended to only require the package for development.

```
composer require iffifan/laravel-debugbar-memory --dev
```

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

```
Iffifan\MemoryDebugbar\Providers\MemoryDebugbarServiceProvider::class,
```

Usage
-----

[](#usage)

After successful installation you should see `Memory` tab in your Debugbar

[![Screenshot](https://camo.githubusercontent.com/676a8d7c37d43e639220427cbd90aa117cbb17d62715b4bd5763092fd3b75330/68747470733a2f2f692e6962622e636f2f684848626e565a2f64656275676261722d6d656d6f72792e6a7067)](https://camo.githubusercontent.com/676a8d7c37d43e639220427cbd90aa117cbb17d62715b4bd5763092fd3b75330/68747470733a2f2f692e6962622e636f2f684848626e565a2f64656275676261722d6d656d6f72792e6a7067)

### Measuring memory usage of a code block

[](#measuring-memory-usage-of-a-code-block)

Let's calculate memory usage of a while loop with helper methods

```
    start_memory_measure('Some Loop');
    $a = 0;
    $b = 'X';
    while ($a < 10000000) {
        $b .= 'X';
        ++$a;
    }
    stop_memory_measure('Some Loop');
```

Memory calculation will be updated like this:

[![Screenshot](https://camo.githubusercontent.com/3ede357f99999b2c971469bf15910fc1b6ab4cd82d372de3752f3561bc16150e/68747470733a2f2f692e6962622e636f2f67727966596b592f64656275676261722d6d656d6f72792d636f64652e6a7067)](https://camo.githubusercontent.com/3ede357f99999b2c971469bf15910fc1b6ab4cd82d372de3752f3561bc16150e/68747470733a2f2f692e6962622e636f2f67727966596b592f64656275676261722d6d656d6f72792d636f64652e6a7067)

Disable
-------

[](#disable)

Just add

```
        'memory_details'  => false, //Display memory details
```

in `config/debugbar.php`

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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/52025e807515cd68183d6450a925316347d6c39fb229eee47c289ab9ab3a4bb1?d=identicon)[iffifan](/maintainers/iffifan)

---

Top Contributors

[![iffifan](https://avatars.githubusercontent.com/u/7587046?v=4)](https://github.com/iffifan "iffifan (10 commits)")

---

Tags

debugdebugbarlaravelphp

### Embed Badge

![Health badge](/badges/iffifan-laravel-debugbar-memory/health.svg)

```
[![Health](https://phpackages.com/badges/iffifan-laravel-debugbar-memory/health.svg)](https://phpackages.com/packages/iffifan-laravel-debugbar-memory)
```

###  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)
