shaheryarmahmod / luhnalgorithm
Luhn Algorithm Implementation to validate Debit & Credit Cards and IMEI numbers.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/shaheryarmahmod/luhnalgorithm
This package is auto-updated.
Last update: 2025-10-29 02:56:57 UTC
README
Luhn Algorithm Implementation in PHP to validate Debit & Credit Cards & IMEI numbers.
Composer
composer require shaheryarmahmod/luhnalgorithm
Example
<?php require_once 'vendor/autoload.php'; use ShaheryarMahmod\LuhnAlgorithm; $number = 4111111111111111; // Check digit calculation var_dump(LuhnAlgorithm::checksum($number)); // int(1) // Validate numbers var_dump(LuhnAlgorithm::isValid($number)); // bool(true)