Category: PHP

Demo for Luhn algorithm in PHP

If you have a number that adheres to the Luhn algorithm for validation, you may check it easily with this short PHP snippet. (Download) You may test this script at Please consider that this is a demo, so please

Luhn algorithm in PHP

As I mentioned before, the Luhn algorithm is used to validate some interesting numbers, most notably GSM IMEIs and credit card numbers. Here’s another implementation I wrote, this time in PHP. (Download)