Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Luhn (Modulo 10 or mod 10 algorithm) for PHP

License

NotificationsYou must be signed in to change notification settings

selective-php/luhn

Repository files navigation

Luhn (modulus 10 or mod 10 algorithm) for PHP

Latest Version on PackagistSoftware LicenseBuild StatusCoverage StatusQuality ScoreTotal Downloads

Requirements

  • PHP 8.1+

Installation

composer require selective/luhn

Usage

Create a number

<?phpuseSelective\Luhn\Luhn;$luhn =newLuhn();echo$luhn->create('7992739871');// 3

Validate a number

<?phpuseSelective\Luhn\Luhn;$luhn =newLuhn();$luhn->validate('79927398713');// true$luhn->validate('79927398710');// false

License

  • MIT

[8]ページ先頭

©2009-2025 Movatter.jp