PHP Classes

PHP Luhn Algorithm: Calculate and validate a Luhn check digit

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 52%Total: 339 All time: 7,080 This week: 660Up
Version License PHP version Categories
luhn-algorithm 0.12GNU General Publi...5Algorithms, PHP 5, Validation
Description 

Author

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  
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

 

  Files folder image Files (3)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:339
This week:0
All time:7,080
This week:660Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:2390