PHP code example of choval / damm
1. Go to this page and download the library: Download choval/damm library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
choval / damm example snippets
damm_digit(string $number) : int
damm_valid(string $number[, string $digit]) : bool
echo damm_digit(572);
// 4
echo damm_digit('572');
// 4
echo damm_digit('0000572');
// 4
echo damm_valid(572, 4);
// true
echo damm_valid(572, 3);
// false
echo damm_valid(5724);
// true
echo damm_valid('000005724');
// true