r/webdev • u/Worried_Librarian_79 • 23m ago
Showoff Saturday Standard identifiers for PHP
https://php-stdnum.org/Over... many months, I've been working on php-stdnum, a PHP library for handling standard identifiers: VAT numbers, tax identifiers, IBANs, national identifiers, company registration numbers, ISBNs, postal codes and others.
It now supports 606 identifier types and includes 594 generators for reproducible test data.
There are no mandatory third-party Composer dependencies, but optional integrations with Laravel, Symfony, Doctrine and FakerPHP.
In benchmarks, direct validation of selected identifiers took 1–5.2 µs per call, with German VAT validation adding approximately 0.11 MiB of process memory. For details see php-stdnum.org/library/docs/guide/performance.html
Tested on PHP 8.3–8.6.
Documentation: php-stdnum.org
GitHub: github.com/php-stdnum/php-stdnum