kminek/numbers

There is no license information available for the latest version (dev-master) of this package.

PHP value-objects for various identification numbers used in Poland (PESEL, REGON, NIP, NRB, etc.)

dev-master 2016-04-13 18:29 UTC

This package is auto-updated.

Last update: 2024-04-17 07:38:46 UTC


README

PHP value-objects for various identification numbers used in Poland:

  • PESEL (national identification number)
  • REGON (taxpayer identification number)
  • NIP (VAT identification number)
  • NRB (national bank account number)

Usage

use Kminek\Numbers\PESEL;

$pesel = PESEL::create('00261503191'); // will throw exception for incorrect PESEL

$pesel->getGender(); // 'male'
$pesel->getSerialNumber(); // '0319'
$pesel->getDate(); // DateTime object
$pesel->getChecksum(); // 1