niclashedam / cpr
This package is abandoned and no longer maintained.
No replacement package was suggested.
A tool for validating Danish CPR-numbers
1.0.1
2018-01-31 12:47 UTC
Requires
- php: >=5.4.0
Requires (Dev)
This package is auto-updated.
Last update: 2020-04-16 12:12:13 UTC
README
A tool for validating Danish CPR-numbers, determining gender and calculating birthday. Almost any CPR-numbers can be validated with modulus 11, which this tool does. As of 2007, some CPR-numbers might return invalid, due to the lack of available CPR-numbers on some given dates.
Installation
Install it using composer
composer require niclashedam/cpr
Usage
Just include it and instantiate the CPR class.
use NiclasHedam/CPR;
$cpr = new CPR("2412958899");
var_dump($cpr->valid());
See exampes/example.php for more examples
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
Released under the MIT license