This package is abandoned and no longer maintained. No replacement package was suggested.

PHP library for turning large numbers into numbers formatted as 1.3k.

0.2.2 2014-07-13 10:51 UTC

This package is not auto-updated.

Last update: 2020-01-20 03:43:14 UTC


A library that helps you create readable and short numbers from numbers that are larger than 999.


Currently, the only reliable way (and recommended way) to install Humongous is by using PHP's package manager Composer.

Using Composer

    "require": {
        "worddrop/humongous": "dev-master"


use Humongous\Humongous;

$number = 13224;
$niceNumber = Humongous::parse($number, 1);
echo $niceNumber; // 13.2k


Humongous::parse(int $number, int $precision = 1, string $decimalSeparator = '.');


  • $number The number that has to be formatted.
  • [$precision = 1] The number of decimals that have to be preserved (0's will automatically be trimmed off)
  • [$decimalSeparator = '.'] A character to separate the decimals.

Returns string


This project is licensed under MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.


You may contribute in any way you want, as long as you agree that your code will be licensed under the same license as the project itself.