mucts / money
数值金额大小写转换
1.1.1
2020-05-24 08:11 UTC
Requires
- php: >=7.2
- ext-bcmath: *
- ext-gmp: *
- ext-mbstring: *
- mucts/helpers: ^1.0
Requires (Dev)
- phpunit/phpunit: ^8.0|^9.0
This package is auto-updated.
Last update: 2024-09-24 18:08:05 UTC
README
Money
数值金额大小写转换。
安装
服务器要求
请确保您的服务器满足以下要求
php ^7.2
GMP PHP 扩展
BCMath PHP 扩展
MBString PHP 扩展
mucts/helpers >=0.1.7
composer require mucts/money
使用方法
- 将阿拉伯数字金额转换为中文大写
<?php $amount = '¥987654321.01'; // $amount = -12344555.67; $amountCn = amount_to_cn($amount);
- 将中文大写金额转换为阿拉伯数字
<?php $amount = amount_to_digit($amountCn);
许可证
MIT