srph/luhn 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

srph/luhn

最新稳定版本:v0.1.0

Composer 安装命令:

composer require srph/luhn

包简介

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

README 文档

README

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

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

Installation

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

$ composer require srph/luhn

Usage

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

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

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

<?php
use function SRPH\Luhn\luhn;

echo luhn('79927398712') // => true
?>

Contribution

Feel free to submit any inquiry, question, issue or pull-request!

Building

* For contributors or for learning purposes only.

Requirements:

First, clone the repository, and then install the development dependencies.

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

You're good to go.

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.

srph.github.io  ·  GitHub @srph  ·  Twitter @_srph

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固