承接 tiny-blocks/currency 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tiny-blocks/currency

Composer 安装命令:

composer require tiny-blocks/currency

包简介

Models ISO-4217 currencies as a PHP enum, with per-currency fraction digit resolution.

README 文档

README

License

Overview

Models ISO-4217 currencies as a PHP enum, covering all standard currency codes with their correct number of fraction digits. Resolves edge cases such as zero-decimal currencies (JPY, KRW), three-decimal currencies (BHD, KWD), and four-decimal currencies (CLF, UYW). Backed by a native PHP enum for zero-overhead comparison and type safety.

Installation

composer require tiny-blocks/currency

How to use

The library exposes the Currency enum. In addition to the alphabetic code, the matching number of fraction digits is available for the respective currency.

<?php

declare(strict_types=1);

use TinyBlocks\Currency\Currency;

$currency = Currency::USD;

$currency->name;                # USD
$currency->value;               # USD
$currency->getFractionDigits(); # 2

License

Currency is licensed under MIT.

Contributing

Please follow the contributing guidelines to contribute to the project.

统计信息

  • 总下载量: 22.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 15
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固