PHPackages                             selective/luhn - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. selective/luhn

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

selective/luhn
==============

Luhn library, modulo 10

1.2.0(2y ago)1098.7k↑32.3%51MITPHPPHP ^8.1

Since Feb 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/selective-php/luhn)[ Packagist](https://packagist.org/packages/selective/luhn)[ Docs](https://github.com/selective-php/luhn)[ RSS](/packages/selective-luhn/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (1)

Luhn
====

[](#luhn)

[Luhn](https://en.wikipedia.org/wiki/Luhn_algorithm) (modulus 10 or mod 10 algorithm) for PHP

[![Latest Version on Packagist](https://camo.githubusercontent.com/01513db6f7e77d111f77aec933492b48c3310c59bb17fdd6107667b51f458810/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f73656c6563746976652d7068702f6c75686e2e737667)](https://packagist.org/packages/selective/luhn)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)[![Build Status](https://github.com/selective-php/luhn/workflows/build/badge.svg)](https://github.com/selective-php/luhn/actions)[![Coverage Status](https://camo.githubusercontent.com/1567e0de4604b54bda44548c1a7465aa6682834806528baa90d94a53e2efd5e9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f73656c6563746976652d7068702f6c75686e2e737667)](https://scrutinizer-ci.com/g/selective-php/luhn/code-structure)[![Quality Score](https://camo.githubusercontent.com/be52ca123ae8b5af23ad0cab420fd8d32d797355e2a14f795c760c086b1d4ac3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f73656c6563746976652d7068702f6c75686e2e737667)](https://scrutinizer-ci.com/g/selective-php/luhn/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/6ebd5a82b64e1e72a1252e542cf7854f81b18c1efdd000c7c45d148bdd0afaa5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73656c6563746976652f6c75686e2e737667)](https://packagist.org/packages/selective/luhn/stats)

Requirements
------------

[](#requirements)

- PHP 8.1+

Installation
------------

[](#installation)

```
composer require selective/luhn

```

Usage
-----

[](#usage)

### Create a number

[](#create-a-number)

```
