PHP code example of selective / luhn
1. Go to this page and download the library: Download selective/luhn 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/ */
selective / luhn example snippets
use Selective\Luhn\Luhn;
$luhn = new Luhn();
echo $luhn->create('7992739871'); // 3
use Selective\Luhn\Luhn;
$luhn = new Luhn();
$luhn->validate('79927398713'); // true
$luhn->validate('79927398710'); // false