PHP Classes

PHP Luhn Algorithm: Calculate and validate a Luhn check digit

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (1 month ago) RSS 2.0 feedNot enough user ratingsTotal: 338 All time: 7,076 This week: 107Up
Version License PHP version Categories
luhn-algorithm 0.12GNU General Publi...5Algorithms, PHP 5, Validation


This class can calculate and validate with the Luhn check digit.

It can take a given number and calculate the check digit using the Luhn (modulus 10) algorith.

The class can also verify if a number is valid by calculating the Luhn check digit and comparing it with the last digit of the number.

Picture of Rolands Kusins
  Performance   Level  
Name: Rolands Kusins <contact>
Classes: 2 packages by
Country: Latvia Latvia
Age: 37
All time rank: 29199 in Latvia Latvia
Week rank: 358 Up3 in Latvia Latvia Up
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example
Accessible without login Plain text file Luhn.php Class Luhn check digit calculation class
Accessible without login Plain text file speed_test.php Example Speed test example

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:7,076
This week:107Up