PHPackages                             davidvandertuijn/filesize - 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. davidvandertuijn/filesize

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

davidvandertuijn/filesize
=========================

Filesize To Human Friendly

1.1(4y ago)0848MITPHPPHP &gt;=7.0.0

Since May 20Pushed 1y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Filesize
========

[](#filesize)

[![Total Downloads](https://camo.githubusercontent.com/df45932e80bb8464fe6aedaa9c0f8b6ed8137bf1775aa07e65b160d35306a06d/68747470733a2f2f706f7365722e707567782e6f72672f646176696476616e6465727475696a6e2f66696c6573697a652f642f746f74616c2e737667)](https://packagist.org/packages/davidvandertuijn/filesize)[![Latest Stable Version](https://camo.githubusercontent.com/755011163ee95f19fe9382d7f913a9b65ae1136505760b83c171788d45df437c/68747470733a2f2f706f7365722e707567782e6f72672f646176696476616e6465727475696a6e2f66696c6573697a652f762f737461626c652e737667)](https://packagist.org/packages/davidvandertuijn/filesize)[![License](https://camo.githubusercontent.com/270e5b4683382d520daa9693be701009288d96d6fd3a3a2789819d2fbb1d7add/68747470733a2f2f706f7365722e707567782e6f72672f646176696476616e6465727475696a6e2f66696c6573697a652f6c6963656e73652e737667)](https://packagist.org/packages/davidvandertuijn/filesize)

[![Filesize](https://camo.githubusercontent.com/fc4ac91d2eac2c94d12d8aac5d72eb76acc402244ae28e22f5f3d11078809ce1/68747470733a2f2f63646e2e646176696476616e6465727475696a6e2e6e6c2f6769746875622f66696c6573697a652e706e67)](https://camo.githubusercontent.com/fc4ac91d2eac2c94d12d8aac5d72eb76acc402244ae28e22f5f3d11078809ce1/68747470733a2f2f63646e2e646176696476616e6465727475696a6e2e6e6c2f6769746875622f66696c6573697a652e706e67)

The Filesize tool allows users to determine the size of files in a variety of formats, providing crucial information for data management and analysis. Understanding file sizes is essential for effective storage planning, data transfer, and resource allocation.

[!["Buy Me A Coffee"](https://camo.githubusercontent.com/9f44ce2dc3b3eecdd02598900866ffc518801df1932849703dae1e5ce5031070/68747470733a2f2f7777772e6275796d6561636f666665652e636f6d2f6173736574732f696d672f637573746f6d5f696d616765732f6f72616e67655f696d672e706e67)](https://www.buymeacoffee.com/davidvandertuijn)

Install
-------

[](#install)

```
composer require davidvandertuijn/filesize

```

Usage
-----

[](#usage)

```
use Davidvandertuijn\Filesize;
```

```
Filesize::toHumanFriendly(
    1024000, // Bytes
    'kB', // Force Unit
    '%01.2f %s', // Format
    'SI' // Standard
);
```

### SI standard (1000 bytes in a kilobyte)

[](#si-standard-1000-bytes-in-a-kilobyte)

```
Filesize::toHumanFriendly(1024000); // 1.02 MB
```

**Force Unit**

```
Filesize::toHumanFriendly(1024000, 'kB'); // 1024.00 kB
```

**Format**

```
Filesize::toHumanFriendly(1024000, null, '%01.3f %s'); // 1.024 MB
```

### IEC standard (1024 bytes in a kibibyte)

[](#iec-standard-1024-bytes-in-a-kibibyte)

```
Filesize::toHumanFriendly(1048576, null, null, 'IEC'); // 1.00 MiB
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~1022 days

Total

2

Last Release

1523d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d8904bedce7fb2ec131c0d18c13aeaa82b00af2fd03ebe099886ac462b1d29e?d=identicon)[davidvandertuijn](/maintainers/davidvandertuijn)

---

Top Contributors

[![davidvandertuijn](https://avatars.githubusercontent.com/u/11010507?v=4)](https://github.com/davidvandertuijn "davidvandertuijn (6 commits)")

### Embed Badge

![Health badge](/badges/davidvandertuijn-filesize/health.svg)

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

###  Alternatives

[tzookb/tbmsg

users messaging system

10917.1k](/packages/tzookb-tbmsg)[cyber-duck/silverstripe-seo

A SilverStripe module to optimise the Meta, crawling, indexing, and sharing of your website content

4351.1k](/packages/cyber-duck-silverstripe-seo)[alexandresalome/assetic-extra-bundle

Extra feature for Assetic (asset directory)

1811.4k](/packages/alexandresalome-assetic-extra-bundle)

PHPackages © 2026

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