PHP code example of komakino / modulus11

1. Go to this page and download the library: Download komakino/modulus11 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/ */

    

komakino / modulus11 example snippets


use Komakino\Modulus11\Modulus11;

Modulus11::validate('11223344'); // returns false
Modulus11::validate('12345674'); // returns true

Modulus11::calculate('1122334'); // returns 6
Modulus11::calculate('1234567'); // returns 4

Modulus11::appendCheckDigit('1122334'); // returns 11223346
Modulus11::appendCheckDigit('1234567'); // returns 12345674