PHPackages                             ondrakub/bank-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ondrakub/bank-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ondrakub/bank-php
=================

Easy-to-use library for getting Czech code or name of bank.

v1.3(7y ago)25151BSD-3-ClausePHPPHP &gt;=5.6

Since Jan 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ondrakub/bank-php)[ Packagist](https://packagist.org/packages/ondrakub/bank-php)[ Docs](https://github.com/ondrakub/bank-php)[ RSS](/packages/ondrakub-bank-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Bank for PHP
============

[](#bank-for-php)

[![Total Downloads](https://camo.githubusercontent.com/ca43af4677f3b85f9cff2b5c3e1415c4b49f9834ece9f3a1fb15fb0a5d652ecf/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6472616b75622f62616e6b2d7068702f646f776e6c6f616473)](https://packagist.org/packages/ondrakub/bank-php)[![Build Status](https://camo.githubusercontent.com/138fe9bca56841d648b1c717e401203deb2e4ecbd820ad58a077093315b8a06e/68747470733a2f2f7472617669732d63692e6f72672f6f6e6472616b75622f62616e6b2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ondrakub/bank-php)[![Latest Stable Version](https://camo.githubusercontent.com/469ece6b23953dc8838ceb80dc8baf44b8f00014efaae9df2a58b6726b150413/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6472616b75622f62616e6b2d7068702f762f737461626c65)](https://packagist.org/packages/ondrakub/bank-php)[![License](https://camo.githubusercontent.com/fa7d5fcf2c84b580327af52da95dd751703af65f079dc3c5a0081beac0789718/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4e65772532304253442d626c75652e737667)](https://github.com/ondrakub/bank-php/blob/master/license.md)

Bank for PHP is a very small and easy-to-use library for works with bank account

Install
-------

[](#install)

via composer

```
php composer.phar require ondrakub/bank-php

```

Usage
-----

[](#usage)

It is simple to use. Just call static methods `Bank::getName($code)` for getting name of bank and `Bank::getCodes($name)` for getting an array of codes of banks

```
try {

	echo Bank::getName(3030);

} catch (BankException $e) {
	echo 'Error: '. $e->getMessage();
}

try {

	$codes = Bank::getCodes('bank');

	foreach ($codes as $key => $value) {
		echo $key . ' - '. $value . '';
	}

} catch (BankException $e) {
	echo 'Error: '. $e->getMessage();
}
```

Or you can work with account number

```
try {

	//accept xx-xx/xxxx, xx/xxxx, 00-xx/xxxx
	$bank = new Bank('1135595026/3030');

	echo 'account number: ' . $bank->getAccount() . '';
	echo 'full account number: ' . $bank->getAccount(Bank::ZERO) . '';
	echo 'prefix: ' . $bank->getPrefix() . '';
	echo 'prefix with zero: ' . $bank->getPrefix(Bank::ZERO) . '';
	echo 'number: ' . $bank->getNumber() . '';
	echo 'number with zero: ' . $bank->getNumber(Bank::ZERO) . '';
	echo 'code: ' . $bank->getCode() . '';
	echo 'valid account: ' . $bank->isValid() . '';
	echo 'IBAN: ' . $bank->getIban() . '';
	echo 'formatted IBAN: ' . $bank->getIban(Bank::FORMATTED) . '';
	echo 'BIC code (SWIFT): ' . $bank->getBic();

} catch (BankException $e) {
	echo 'Error: '. $e->getMessage();
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity62

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~421 days

Total

5

Last Release

2817d ago

PHP version history (2 changes)v1.2PHP &gt;=5.3

v1.3PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/b921e7ab7bac716e1e15974ec7f8486b4686a026e76ba31e4c857d4dd7b50216?d=identicon)[ondrakub](/maintainers/ondrakub)

---

Tags

codeBanknamenumberaccountswiftIBANBICvalid

### Embed Badge

![Health badge](/badges/ondrakub-bank-php/health.svg)

```
[![Health](https://phpackages.com/badges/ondrakub-bank-php/health.svg)](https://phpackages.com/packages/ondrakub-bank-php)
```

###  Alternatives

[endroid/qr-code

Endroid QR Code

4.8k67.6M348](/packages/endroid-qr-code)[laminas/laminas-code

Extensions to the PHP Reflection API, static code scanning, and code generation

1.9k185.4M172](/packages/laminas-laminas-code)[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M576](/packages/nette-php-generator)[jetbrains/phpstorm-stubs

PHP runtime &amp; extensions header files for PhpStorm

1.4k27.7M68](/packages/jetbrains-phpstorm-stubs)[scrivo/highlight.php

Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js

71040.3M82](/packages/scrivo-highlightphp)[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8013.3M23](/packages/ronanguilloux-isocodes)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
