beerntea / iban
IBAN工具库
1.2.1
2024-03-18 20:51 UTC
Requires
- php: >=8.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpstan/phpstan-strict-rules: ^1.5
- phpunit/phpunit: ^9
Suggests
- ext-bcmath: Because this library makes use of bcmod function, bcmath extension is recommended for performance.
- phpunit/phpunit: If PHP Unit is not globally installed on your system the tests will not run, install the PHP Unit package locally to run the tests
This package is auto-updated.
Last update: 2024-09-18 22:15:26 UTC
README
beerntea/iban 是一个用于验证IBAN银行账户号码的PHP 8.0+库。它目前支持99个国家的IBAN验证。
它基于cmpayments/iban,看起来已被遗弃。增加了对php > 8.0的支持,更新了依赖项和单元测试。
安装
要安装 beerntea/iban,只需使用 composer 进行要求
composer require beerntea/iban
使用示例
<?php require 'vendor/autoload.php'; use Beerntea\IBAN; $iban = new IBAN('NL58ABNA0000000001'); // validate the IBAN if (!$iban->validate($error)) { echo "IBAN is not valid, error: " . $error; } // pretty print IBAN echo $iban->format();
提交bug和功能请求
bug和功能请求在GitHub上跟踪
版权和许可
beerntea/iban库中的编辑版权© Beerntea,许可使用MIT许可证(MIT)。cmpayment/iban库版权© Bas Peters,许可使用MIT许可证(MIT)。有关更多信息,请参阅[LICENSE][]。