PHPackages                             sirmekus/otu - 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. sirmekus/otu

ActiveLibrary

sirmekus/otu
============

Otu is a PHP-based package that handles fine-formatting of string representation of (very) large numbers with their 'magnitude'. For instance, '50m' means 50000000. We can decide to write the entire 50000000 or just pass it to this package in the form of '50m' and have it take care of the presentation. It also works vice-versa. Walk with me.

v1.0(2y ago)15MITPHPPHP &gt;=8.0.0

Since Apr 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/SirMekus/otu)[ Packagist](https://packagist.org/packages/sirmekus/otu)[ RSS](/packages/sirmekus-otu/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Igwe
====

[](#igwe)

Otu is a PHP-based package that handles fine-formatting of string representation of (very) large numbers with their 'magnitude'. For instance, "50m" means 50000000. We can decide to write the entire 50000000 or just pass it to this package in the form of "50m" and have it take care of the presentation. It also works vice-versa. Walk with me.

> As typical of my packages, each usage introduces you to a new word in Igbo language. You can be sure that "otu" is an Igbo word, and it means "one" which is actually a number anyway. You only need this "one" package, and without any dependencies, to improve productivity...#winks.

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

[](#installation)

To get started all you need to do is:

```
composer require sirmekus/otu
```

That's all.

> Please note that as at this time, we only support the following 'magnitudes' (it is case-insensitive): k: Thousand, m: Million, b: Billion, t: trillion

---

Supported "magnitude"/symbolMagnitudeExampleFigurekThousand"50k"50000mMillion"40m"40000000bBillion"50b"50000000000tTrillion"1t"1000000000000Usage
-----

[](#usage)

---

Convert a string representation to a number
-------------------------------------------

[](#convert-a-string-representation-to-a-number)

Example:

```
require_once 'vendor/autoload.php';

use Emmy\App\Assistant\Otu;

$converted = Otu::convertToNumber("89k");
//Output: 89000

$converted = Otu::convertToNumber("89.54k");
//Output: 89540

$converted = Otu::convertToNumber("89.5k");
//Output: 89500

$converted = Otu::convertToNumber("50.6M");
//Output: 50600000

//etc.
```

If you would like to present it in a more friendly human-readable format

```
$converted = Otu::format("50.6M");
//Output: 50,600,000.00
```

Abbreviate/represent a large number with its 'magnitude'
--------------------------------------------------------

[](#abbreviaterepresent-a-large-number-with-its-magnitude)

Example:

```
require_once 'vendor/autoload.php';

use Emmy\App\Assistant\Otu;

$converted = Otu::abbreviate(290450);
//Output: 290.5K

$converted = Otu::abbreviate(290450, round:false);
//Output (prevent rounding up "decimal" part): 290.4K

//Specify output in 2 'decimal' places
$converted = Otu::abbreviate(290456,2);
//Output: 290.46K

$converted = Otu::abbreviate(290450, useUnit:false);
//Output (full specification of the magnitude): 290.5 thousand
```

Meanwhile
---------

[](#meanwhile)

You can connect with me on [LinkedIn](https://www.linkedin.com/in/sirmekus) for insightful tips, and so we can grow our networks together.

Check our educational platform for High Schools: [i-runs](https://www.i-runs.com).

And follow me on [Twitter](https://www.twitter.com/Sire_Mekus).

We can also catch fun on [Tiktok](https://www.tiktok.com/@emmybuoy?_t=8luE6m2o0rV&_r=1).

Join forces with me on [Instagram](https://www.instagram.com/sir_mekus/?igsh=MWN1c3ZoNzFmdnR0)

I encourage contribution even if it's in the documentation. Thank you, and I really hope you find this package helpful.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

747d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28a362d4564e674503260a2ed783e522418dcf6484eeb91616e4624c77a775f9?d=identicon)[sirmekus](/maintainers/sirmekus)

---

Top Contributors

[![webloit-dev](https://avatars.githubusercontent.com/u/66807744?v=4)](https://github.com/webloit-dev "webloit-dev (6 commits)")

### Embed Badge

![Health badge](/badges/sirmekus-otu/health.svg)

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

PHPackages © 2026

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