PHP code example of cs278 / bank-modulus
1. Go to this page and download the library: Download cs278/bank-modulus 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/ */
cs278 / bank-modulus example snippets
use Cs278\BankModulus\BankModulus;
$modulus = new BankModulus();
$modulus->check('08-16-32', '12481632');
$sortCode = '12-24-48';
$accountNumber = '123456';
$modulus->normalize($sortCode, $accountNumber);
var_dump($sortCode, $accountNumber);
// string(6) "122448"
// string(8) "00123456"