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.
Install it using composer
composer require niclashedam/cpr
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
- 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
Released under the MIT license