PHPackages                             toolstud-io/si\_format - 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. toolstud-io/si\_format

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

toolstud-io/si\_format
======================

PHP package to format numbers according to SI standards (milli, micro, nano... / Kilo, Mega, Giga...)

1.0.3(4y ago)09MITPHPPHP ^7.4|^8.0

Since Nov 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/toolstud-io/si_format)[ Packagist](https://packagist.org/packages/toolstud-io/si_format)[ Docs](https://github.com/toolstud-io/si_format)[ RSS](/packages/toolstud-io-si-format/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

PHP package to format number according to SI standards
======================================================

[](#php-package-to-format-number-according-to-si-standards)

Github: [![GitHub tag](https://camo.githubusercontent.com/21f215ee81d9259c9d12a724510bffb2a143ae0e09991e39d8c73062fd516089/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f746f6f6c737475642d696f2f73695f666f726d6174)](https://camo.githubusercontent.com/21f215ee81d9259c9d12a724510bffb2a143ae0e09991e39d8c73062fd516089/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f746f6f6c737475642d696f2f73695f666f726d6174)[![Tests](https://github.com/toolstud-io/si_format/workflows/Run%20Tests/badge.svg)](https://github.com/toolstud-io/si_format/workflows/Run%20Tests/badge.svg)[![Psalm](https://github.com/toolstud-io/si_format/workflows/Detect%20Psalm%20warnings/badge.svg)](https://github.com/toolstud-io/si_format/workflows/Detect%20Psalm%20warnings/badge.svg)

Packagist: [![Packagist Version](https://camo.githubusercontent.com/ad11805616064a83de3013eb8607a10d1047593167db6aea3baa97a0808a2931/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6f6c737475642d696f2f73695f666f726d61742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/toolstud-io/si_format)[![Packagist Downloads](https://camo.githubusercontent.com/8070aba28268ad6f99f27d7ecfbeeb311f28e2d723067009ed2998a5ab758890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6f6c737475642d696f2f73695f666f726d61742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/toolstud-io/si_format)

PHP package to format numbers according to [SI standards](https://en.wikipedia.org/wiki/International_System_of_Units) (e.g. mm, millimeter, Km, GB, Gigabyte, Gibibyte)

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

[](#installation)

You can install the package via composer:

```
composer require toolstud-io/si_format
```

Usage
-----

[](#usage)

```
$obj = new ToolstudIo\SiFormat(false,"m");
echo $obj->format(1000000);
// returns "1km"
echo $obj->format(.001);
// returns "1mm"

$obj = new ToolstudIo\SiFormat(false,"B",1024);
echo $obj->format(1024);
// returns "1KB"
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email author\_email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Peter Forret](https://github.com/toolstud-io)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

12

Last Release

1625d ago

Major Versions

0.1.7 → 1.0.02021-11-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/474312?v=4)[Peter Forret](/maintainers/pforret)[@pforret](https://github.com/pforret)

---

Top Contributors

[![pforret](https://avatars.githubusercontent.com/u/474312?v=4)](https://github.com/pforret "pforret (26 commits)")

---

Tags

toolstud-iosi\_format

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/toolstud-io-si-format/health.svg)

```
[![Health](https://phpackages.com/badges/toolstud-io-si-format/health.svg)](https://phpackages.com/packages/toolstud-io-si-format)
```

###  Alternatives

[proget-hq/apple-activation-lock

Library for generating Apple Activation Lock Bypass key and hash

6515.8k](/packages/proget-hq-apple-activation-lock)[statamic/migrator

4426.2k](/packages/statamic-migrator)[saadj55/filament-copyable

Filament fields and columns with copyable values

365.6k](/packages/saadj55-filament-copyable)

PHPackages © 2026

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