PHPackages                             betalabs/credit-card-type - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. betalabs/credit-card-type

ActiveLib[Validation &amp; Sanitization](/categories/validation)

betalabs/credit-card-type
=========================

Script to validate and get credit card type by number

0.1.1(7y ago)026.0k↓18.8%2[1 PRs](https://github.com/Betalabs/credit-card-type/pulls)MITPHPPHP &gt;=5.4.0

Since Aug 1Pushed 7y ago7 watchersCompare

[ Source](https://github.com/Betalabs/credit-card-type)[ Packagist](https://packagist.org/packages/betalabs/credit-card-type)[ Docs](https://betalabs.com.br/)[ RSS](/packages/betalabs-credit-card-type/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Validate and get credit card type by Number

### Installation

[](#installation)

Via Composer

```
composer require 'betalabs/credit-card-type'
```

### Usage

[](#usage)

```
require __DIR__  . '/vendor/autoload.php';

$card = '4111111111111111';

echo CreditCardType\CreditCardType::get($card); //visa
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2847d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5718a3a2c41de555560fde3279aaf122ce1584540c5f123e7661eaa3d79dba73?d=identicon)[diego-betalabs](/maintainers/diego-betalabs)

---

Top Contributors

[![wbianchini](https://avatars.githubusercontent.com/u/7657356?v=4)](https://github.com/wbianchini "wbianchini (1 commits)")

---

Tags

cardtypescredit-cardbrand

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/betalabs-credit-card-type/health.svg)

```
[![Health](https://phpackages.com/badges/betalabs-credit-card-type/health.svg)](https://phpackages.com/packages/betalabs-credit-card-type)
```

###  Alternatives

[laravel-validation-rules/credit-card

Validate credit card number, expiration date, cvc

2412.2M5](/packages/laravel-validation-rules-credit-card)[inacho/php-credit-card-validator

Validates popular debit and credit cards numbers against regular expressions and Luhn algorithm. Also validates the CVC and the expiration date

2051.4M11](/packages/inacho-php-credit-card-validator)[jlorente/php-credit-cards

A PHP package to perform operations on debit and credit cards like format, validate brand, number and Luhn algorithm. It validates popular brands like Visa, Mastercard, American Express, etc.

44421.2k1](/packages/jlorente-php-credit-cards)[nekman/luhn-algorithm

Implementation of the Luhn algorithm in PHP. Used in validation of credit card numbers and some national identification numbers.

22819.4k](/packages/nekman-luhn-algorithm)[rap2hpoutre/laravel-credit-card-validator

Laravel credit card validator

22129.5k](/packages/rap2hpoutre-laravel-credit-card-validator)[dragon-code/card-number

Generation and verification of card numbers using Luhn's algorithm.

6512.8k](/packages/dragon-code-card-number)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
