Iban
[Deprecated] Validating and generating international :bank: bank account numbers (IBAN)
Install / Use
/learn @jschaedl/IbanREADME
Iban
Important: This library is derecated. Please use https://github.com/jschaedl/iban-validation instead.
A small library for validating and generating International Bankaccount Numbers (IBAN). It is build for PHP 5.3+.
Development status
This library is ready to use. The Iban validation should be run fine, but there is no warranty for the generation functionality. Please use it at your own risk.
Changelog
Version 1.3.0
- Activation of new german Iban rules valid from 6th of March 2016
Version 1.2.0
- Activation of new german Iban rules valid from 5th of December 2016
Installation
To install jschaedl/iban just run:
$ composer require jschaedl/iban
You can see this library on Packagist.
Composer installs autoloader at ./vendor/autoload.php. If you use jschaedl/iban in your php script, add:
require_once 'vendor/autoload.php';
Usage example
<?php
use IBAN\Validation\IBANValidator;
use IBAN\Generation\IBANGeneratorDE;
use IBAN\Generation\IBANGeneratorNL;
// validation example
$ibanValidator = new IBANValidator();
if ($ibanValidator->validate('DE89370400440532013000')) {
echo "DE89370400440532013000 is valid!";
}
// generate german iban example #1
$ibanGenerator = new IBANGeneratorDE();
$generatedIban = $ibanGenerator->generate('60050101', '502502502');
// $generatedIban => DE15600501010001108884
// generate german iban example #2
$generatedIban = IBANGenerator::DE('60050101', '502502502');
// $generatedIban => DE15600501010001108884
// generate dutch iban example #1
$ibanGenerator = new IBANGeneratorNL();
$generatedIban = $ibanGenerator->generate('ABNA', '123456789');
// $generatedIban => NL02ABNA0123456789
// generate dutch iban example #2
$generatedIban = IBANGenerator::NL('ABNA', '123456789');
// $generatedIban => NL02ABNA0123456789
How to contribute
If you want to fix some bugs or want to enhance some functionality, please fork this repository and create a feature branch based on the develop branch or a htfix branch based on the master branch. Then fix the bug you found or add your enhancements and make a pull request. Please commit your changes in tiny steps and add a detailed description on every commit.
Unit Testing
All pull requests must be accompanied by passing unit tests. This repository uses PHPUnit and Composer.
You must run composer install to install this package's dependencies before the unit tests will run.
You can run the test via:
phpunit -c tests/phpunit.xml tests/
ToDos
- add support for more countries
Author
Contributions
https://github.com/jschaedl/Iban/graphs/contributors
License
MIT Public License
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。

