beerntea / iban
IBAN utility library
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
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-19 02:52:09 UTC
README
beerntea/iban is a PHP 8.0+ library for validating IBAN bank account numbers. It currently supports IBAN validation of 99 countries.
It's based on cmpayments/iban, which seems abandoned. Added support for php > 8.0, updated dependencies and unit tests.
Installation
To install beerntea/iban just require it with composer
composer require beerntea/iban
Usage example
<?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();
Submitting bugs and feature requests
Bugs and feature request are tracked on GitHub
Copyright and license
The edits in the beerntea/iban library is copyright © Beerntea and licensed for use under the MIT License (MIT). The cmpayment/iban library is copyright © Bas Peters and licensed for use under the MIT License (MIT). Please see [LICENSE][] for more information.