Download the PHP package miladk/bekrafta without Composer
On this page you can find all versions of the php package miladk/bekrafta. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package bekrafta
Bekräfta 
Bekräfta: A PHP library to perform common operations on Personal Identification Numbers, like: Validation, censoring the individual digits, calculating age and detecting gender.
Supported Countries
- Denmark (CPR-Nummer)
- Finland (Henkilötunnus, Personbeteckning)
- Poland (PESEL)
- Netherlands (Burgerservicenummer) Validation only
- Norway (Fødselsnummer)
- Sweden (Personnummer)
Supported PHP Versions
- PHP 7.0
- PHP 7.1
- PHP 7.2
Installation
Usage
This library offers one interface for all supported countries. Developers don't have to use specific countries' classes, instead there is one class that detects and uses the country and serves the appropriate values.
Or you can use a specific country if you only need that.
Sweden Extended
In Sweden, some companies add the century digits as a part of the personal number, or remove the symbol between the date of birth and the four other digits. These changes are not part of the standard of the official standard. So I included to classes for Sweden:
- Sweden: Supports the official standard format.
- SwedenExtended: Supports the popular non-standard formats. This has two more functions:
- removeLeadingCenturies() it removes the leading 19 or 20 from the personal number.
- removeNonNumbers() Removes non-numeric characters form personal number.
Denmark Strict
However, in 2007 the available sequence numbers under this system for males born on 1 January 1965 ran out, and since October 2007 personal identification numbers do not always validate using the check digit. This had been predicted and announced several years in advance. Thus, most IT systems are presumed updated to accept numbers that fail the check-digit validation. — Wikipedia
Therefore, I see no use for performing a checksum on Danish personal numbers, because we will get false negatives. However, if you want to use the checksum, you can use the class DenmarkStrict which performs the checksum on the personal number, you will get false positives though.
License
MIT