HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
globalcitizen
php-iban
PHP2015–2024
globalcitizen / php-iban

php-iban

Generate, parse, validate, error-correct and present IBAN (and IIBAN) bank account information in PHP.

2Distinct people
10Mentions
0Explicit recommenders
511GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Generate, parse, validate, error-correct and present IBAN (and IIBAN) bank account information in PHP.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year10 dated mentions

Observed mentions: 2015-07-03 05:45:14 UTC to 2024-03-07 21:41:45 UTC.

012342015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC101
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC413
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC202
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

10 sources
Memories. ~10 years ago I looked in to this stuff as part of adding national checksum support to an IBAN library. It was quite a mission to discover the number of systems out there, most of which were insufficiently documented or undocumented. Wound up reverse engineering quite a few of them (period braindump available[3]). In the end I wrote a function[1] which reverses an input known to fail a checksum to determine probable transcription errors based upon a manually compiled, exhaustive list of probable mistranscriptions[2]. I was quite impressed at how fast and accurate it was. From a systems architecture standpoint, I learned that there is really no excuse today for creating a system in which human transcription may occur without a checksum mechanism. Largely, however, QR codes and the trusted optical exchange of identifiers in physic
Read the rest
In Take a break: Error-detecting codes in credit card numbers, ISBNs etc. (2000)
I maintain an IBAN library.[0] There is actually a lot that is interesting about account numbers. Really well designed account number systems do not include similar glyphs, for example both '1' and 'L' or both '0' and 'O' should not both be present. I have compiled a retroactive list of probable transposition errors in my library, which can recommend checksum-correct potential input intent through brute force search.[1] While many countries and specific banks had or have alternate checksum systems that pre-date IBAN, not all of them actually cover the whole account number (eg. may only cover the account number itself, not the sort code / branch code / bank code / whatever else). These are also falling out of use at an unreported rate so it is often difficult to determine whether or not they are now significant. Often a bank just starts ig
Read the rest
noring its previous rules without telling anyone, leading to popular confusion. IBAN is a pretty well designed system, possibly excepting the mistranscription issues which it probably considered out of scope but could have seriously helped to avoid with recommendations / best practices. The point of all this is that you shouldn't reinvent the wheel... and that goes for digital banking and digital currency systems as well as any other system with identifiers that may need to be manually analyzed, compared, reported or transcribed. [0] https://github.com/globalcitizen/php-iban [1] https://raw.githubusercontent.com/globalcitizen/php-iban/mas...
In “I lost my inheritance with one wrong digit on my sort code”
Still better is grouped alphanumeric without potentially ambiguous characters (ie. generate number-1's but not letter-I's, generate number-0's but not letter-O's). I wrote a disambiguation library based upon the checksums present in IBAN @ https://github.com/globalcitizen/php-iban .. it's surprising how accurate the mistranscription suggestions are. In general, pure-number systems are better if possible, but where you have issues squashing in enough data in suitably compact form, transitioning to alphanumeric is better. You can also consider the use prefix-based systems, either utilizing temporal epochs or node-specific prefixes, both of which can utilize readable aliases. Finally, for anything expecting human transcription, checksum systems are awesome!
In Git 2.11 has been released
Just yesterday I found myself reverse engineering checksum algorithms in various domestic bank account systems about the world. https://github.com/globalcitizen/php-iban/issues/39 I went for an explanation of some of the newer ones I hadn't heard of before (Damm) and it was painful. (The code was only a few lines, though!) While some algorithms had a pre-existing implementation, wiser than rewriting I simply nabbed them and evaluated. Most of the implementations were unreadable/undocumented and of dubious origin, many of the implementations claiming to provide the same algorithm delivered different results. Some of these work for some countries, some for others. No idea where the differences lie and not enough interest to bother finding out. Then of course there's the origin of these 'standards', ISO, who insist on charging 88CHF for a 5
Read the rest
page document, thus we can't actually read the damn standard. I would up porting a family of algorithms from Java using code generation. Why we don't yet have a library delivering smackdown-documented functions in arbitrary languages for named algorithms escapes me...
In Why There Is No Hitchhiker’s Guide to Mathematics for Programmers
Many of us from the pre-stripe era have implemented Luhn once or twice I'd say, very often in Javascript and web scripting languages! However, you really should avoid re-implementing this sort of thing, and particularly additional credit card checks as it's easy to make spurious assumptions (eg. credit card prefix should equal country of address of credit card, or of mailing address) which are in fact invalid. This stuff prevents actual sales and frustrates your users. For a slightly out there and arguably more interesting financial checksum algorithm, and one that is actually amazingly effective, do some statistics on mod97's performance. Realizing how good it was, a few years back for a cool hack in my IBAN library I wrote a mistranscription error suggestion system, which plays off the strengths of mod97. See https://github.com/globalci
Read the rest
tizen/php-iban/blob/master/trunk/... and https://github.com/globalcitizen/php-iban/blob/master/trunk/... - for a quick hack, it's amazingly effective. PS. I am available for remote gigs doing creative or challenging stuff in finance-land at the moment, if anyone appreciates this sort of thing.
In Luhn Algorithm for validating credit cards

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.