PHPackages                             serhii/short-number - 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. serhii/short-number

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

serhii/short-number
===================

For changing the language you want to call `set` method once before calling other methods from this package.

4.3.0(5mo ago)73.2k[1 PRs](https://github.com/short-number/short-number/pulls)MITPHPPHP ^8.1CI passing

Since Dec 16Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (25)Used By (0)

Short Number
============

[](#short-number)

[![Short number](https://github.com/short-number/short-number/actions/workflows/php.yml/badge.svg)](https://github.com/short-number/short-number/actions/workflows/php.yml)[![Total Downloads](https://camo.githubusercontent.com/c7db7ae8c8ff84fdd2a26802c879047fab17648bac880b41ce84d8581addbcd6/68747470733a2f2f706f7365722e707567782e6f72672f7365726869692f73686f72742d6e756d6265722f646f776e6c6f616473)](https://packagist.org/packages/serhii/short-number)[![License](https://camo.githubusercontent.com/3c6c31d4fc38fc2917d847d99eb51c2a7367692e5e6b557a2d7e08b51653eb8c/68747470733a2f2f706f7365722e707567782e6f72672f7365726869692f73686f72742d6e756d6265722f6c6963656e7365)](https://packagist.org/packages/serhii/short-number)

Lightweight package shortens given number to a short representation of it. For example **1234** will be formatted to **1k** and **20244023** to **20m**. Package supports multiple languages and can be easily extended with new languages.

### Follow the [full documentation](https://short-number.github.io/) for this package

[](#follow-the-full-documentation-for-this-package)

Quick Start
-----------

[](#quick-start)

```
composer require serhii/short-number
```

Supported Languages
-------------------

[](#supported-languages)

FlagLanguageCode🇬🇧Englishen🇷🇺Russianru🇺🇦Ukrainianuk🇨🇳Chinesezh🇯🇵JapanesejaLicense
-------

[](#license)

The Short Number project is licensed under the [MIT License](https://github.com/short-number/short-number/blob/master/LICENSE.md)

Contribute
----------

[](#contribute)

### With Container Engine

[](#with-container-engine)

#### Build an Image

[](#build-an-image)

To build an image, navigate to the root of the project and run this command.

With Podman:

```
podman-compose build app
```

With Docker:

```
docker compose build app
```

#### Run the Container

[](#run-the-container)

To run a container, navigate to the root of the project and run this command.

With Podman:

```
podman-compose run --rm app
```

With Docker:

```
docker compose run --rm app
```

#### Cleanup

[](#cleanup)

You can remove networks and cleanup by running this command.

With Podman:

```
podman-compose down
```

With Docker:

```
docker compose down
```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance75

Regular maintenance activity

Popularity24

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity76

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

Recently: every ~86 days

Total

23

Last Release

172d ago

Major Versions

1.1.1 → 2.02020-12-05

2.0.3 → 3.0.02022-01-27

3.0.9 → 4.0.02024-12-17

3.1.0 → 4.1.02025-01-02

PHP version history (4 changes)1.0PHP ^7.1

2.0.3PHP ^7.1|^8.0

3.0.0PHP ^7.2|^8.0

4.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/492847fa1c01ef11bfb489695d1d8553d4729f59efce19b34b8ed4b0f3598fae?d=identicon)[SerhiiCho](/maintainers/SerhiiCho)

---

Top Contributors

[![SerhiiCho](https://avatars.githubusercontent.com/u/35465417?v=4)](https://github.com/SerhiiCho "SerhiiCho (252 commits)")

---

Tags

composer-packagedatetimepackagepackagistphplibraryformat-numbershorten number

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/serhii-short-number/health.svg)

```
[![Health](https://phpackages.com/badges/serhii-short-number/health.svg)](https://phpackages.com/packages/serhii-short-number)
```

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

70036.3M116](/packages/league-iso3166)[league/statsd

A simple library for working with StatsD in PHP.

3514.3M12](/packages/league-statsd)[payum/iso4217

ISO 4217 PHP Library

16312.1M5](/packages/payum-iso4217)[lambdish/phunctional

λ PHP functional library

3612.0M23](/packages/lambdish-phunctional)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)

PHPackages © 2026

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