PHPackages                             tkachikov/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tkachikov/memory

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tkachikov/memory
================

Package for view memory with postfix (KB, GB, etc)

1.2(2y ago)24.1k↓40.9%2MITPHPPHP ^8.1

Since May 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tkachikov/memory)[ Packagist](https://packagist.org/packages/tkachikov/memory)[ RSS](/packages/tkachikov-memory/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (2)

memory
======

[](#memory)

[![Memory release: 1.2](https://camo.githubusercontent.com/14585c2b0dcec1e147cf1b8f19a877e5a9c314f6da8e5b0ec5324e309e6652af/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d312e322d3030423245452e737667)](https://packagist.org/packages/tkachikov/memory)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)

This package need to convert bytes to view. Exmaple: 4194304 =&gt; 4 MB

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

[](#installation)

```
composer require tkachikov/memory
```

Usage
-----

[](#usage)

```
// Create class
$memory = new Memory();

// Example memory usage: 2 MB
$usage = $memory->showUsage();

// Exmaple memory peak: 4 MB
$peak = $memory->showPeak();

// Get custom view memory
$customMemory = (new Memory()) // or in Laravel app(Memory::class)
  ->size(memory_get_usage(true))
  ->show();

// Reset peak memory (work on php 8.2)
$memory->reset();
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

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.

###  Release Activity

Cadence

Every ~2 days

Total

4

Last Release

1089d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b2b52385dbfd06d048dbb61ec49947e634d2272c0dddb34f07e99281bb97faa4?d=identicon)[tkachikov](/maintainers/tkachikov)

---

Top Contributors

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

---

Tags

helpermemory

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tkachikov-memory/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[bryanjhv/slim-session

Session middleware and helper for Slim framework 4.

233961.5k16](/packages/bryanjhv-slim-session)[laravelista/ekko

Framework agnostic PHP package for marking navigation items active.

278673.4k4](/packages/laravelista-ekko)[beste/json

A simple JSON helper to decode and encode JSON

4222.7M3](/packages/beste-json)[chillerlan/php-settings-container

A container class for immutable settings objects. Not a DI container.

3427.3M21](/packages/chillerlan-php-settings-container)[kartik-v/yii2-helpers

A collection of useful helper functions for Yii Framework 2.0

883.0M29](/packages/kartik-v-yii2-helpers)

PHPackages © 2026

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