PHPackages                             bariscodefx/php-number-format-kmt - 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. bariscodefx/php-number-format-kmt

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

bariscodefx/php-number-format-kmt
=================================

Format numbers as K, M, and T. (example: 300000 -&gt; 300k)

v1.0.0(1y ago)07GPL-3.0PHPPHP &gt;=7.0

Since Aug 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bariscodefxy/PHPNumberFormatKMT)[ Packagist](https://packagist.org/packages/bariscodefx/php-number-format-kmt)[ RSS](/packages/bariscodefx-php-number-format-kmt/feed)WikiDiscussions master Synced 2d ago

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

PHPNumberFormatKMT
==================

[](#phpnumberformatkmt)

What is this?
-------------

[](#what-is-this)

This is a **very very** simple number format library for formatting numbers like; 320.000.000 -&gt; 320M, 12.000 -&gt; 12K, 1.300.000.000 -&gt; 1.3T.

Why I did that?
---------------

[](#why-i-did-that)

I don't like PHP's number/currency formatting. It's only formats with dots (.) and commas (,). Most games use (K, M, T) letters for number formatting. And I think that's better.

How to install?
---------------

[](#how-to-install)

`composer require bariscodefx/php-number-format-kmt`

Usage
-----

[](#usage)

```
