2017 © Pedro Peláez
 

library luhn

An implementation of Luhn algorithm (aka mod-10 algorithm) in PHP.

image

srph/luhn

An implementation of Luhn algorithm (aka mod-10 algorithm) in PHP.

  • Friday, March 20, 2015
  • by srph
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-luhn Build Status Latest Stable Version MIT license

An implementation of Luhn algorithm (aka mod-10 algorithm) to validate (verify the checksum of) credit card numbers in PHP., (*1)

* This was written to try out PHPUnit, but feel free to use it for anything as long as the MIT License permits., (*2)

Installation

To install this library, simply run composer require in your project's root directory:, (*3)

$ composer require srph/luhn

Usage

This library is very easy to use! Our function only accepts one string argument and returns a boolean., (*4)

<?php
/**
 * SRPH\Luhn\luhn(<string>);
 */
SRPH\Luhn\luhn('79927398712') => true
?>

For PHP >=v5.6, you can use the use function (aka import function) syntax:, (*5)

 true
?>

Contribution

Feel free to submit any inquiry, question, issue or pull-request!, (*6)

Building

* For contributors or for learning purposes only., (*7)

Requirements: - PHP >=v5.x (Ehh?) - Composer (Install development dependencies) - Git (To clone the repository), (*8)

First, clone the repository, and then install the development dependencies., (*9)

$ git clone https://github.com/srph/luhn.php.git && cd luhn.php
$ composer install

You're good to go., (*10)

Automation

# ensure that you are in the root directory of the project
$ phpunit # run tests

Acknowledgement

php-luhn © 2015+, Kier Borromeo (srph). Released under the MIT License., (*11)

srph.github.io  ·  GitHub @srph  ·  Twitter @_srph, (*12)

The Versions

20/03 2015

dev-master

9999999-dev

An implementation of Luhn algorithm (aka mod-10 algorithm) in PHP.

  Sources   Download

MIT

The Development Requires

by Avatar srph

16/03 2015

v0.1.0

0.1.0.0

An implementation of Luhn algorithm (aka mod-10 algorithm) in PHP.

  Sources   Download

MIT

The Development Requires

by Avatar srph