eclipsio/number-humanoid
最新稳定版本:v2.0.0
Composer 安装命令:
composer require eclipsio/number-humanoid
包简介
Convert Number to Identifier in K(thousands), M(Millions), B(Billions), T(Trillions).
README 文档
README
A Class for converting a number to a human readable string with K,M,B,T etc.
Install
composer require eclipsio/number-humanoid
Example Human Readable String
<?php use Eclipsio\NumberHumanoid\Humanoid; $num = 10200; $human = new Humanoid($num); echo $human->out; // 10.20K echo $human->number; // 10.20 echo $human->expression; // K
Number to Words
This Class allows to conver a number to words, which supports about quadrillion as well as decimals too.
How to use
use Eclipsio\NumberHumanoid\NumberToWords; $num = 71176482.556; $str = NumberToWords::toWords($num); echo $str;
Output will be
seventy one millions one hundred seventy six thousands four hundred eighty two point five five six
统计信息
- 总下载量: 76
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-05