PHPackages                             arabhossain/php-cards-detector - 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. arabhossain/php-cards-detector

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

arabhossain/php-cards-detector
==============================

Any types of Debit or Credit card type detector

v1.1.4(6y ago)2242MITPHPPHP &gt;=5.3CI failing

Since Aug 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/arabhossain/php-cards-detector)[ Packagist](https://packagist.org/packages/arabhossain/php-cards-detector)[ Docs](https://www.linkedin.com/in/arabhossain)[ RSS](/packages/arabhossain-php-cards-detector/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

Detect Debit Credit Card Types with logo
========================================

[](#detect-debit-credit-card-types-with-logo)

Utility to determine credit card type

### Installation

[](#installation)

```
composer require arabhossain/php-cards-detector

```

### Supported Cards

[](#supported-cards)

6. Amex
7. DinersClub
8. Discover
9. JCB
10. Maestro
11. MasterCard
12. Visa
### Usage

[](#usage)

```
require "vendor/autoload.php";

echo \CardDetector\Detector::detect("5555555555554444")->get_name();
echo \CardDetector\Detector::detect("5555555555554444")->get_logo();
echo \CardDetector\Detector::detect("5555555555554444")->get_logo_base64();

```

> Or you can simply use

```
use  \CardDetector\Detector as CardDetector;
echo CardDetector::detect(23232313131313)->get_name();

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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 ~13 days

Total

5

Last Release

2453d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18322957?v=4)[Arab Hossainn](/maintainers/arabhossain)[@arabhossain](https://github.com/arabhossain)

---

Top Contributors

[![arabhossain](https://avatars.githubusercontent.com/u/18322957?v=4)](https://github.com/arabhossain "arabhossain (20 commits)")

---

Tags

amexcarddetectordinersclubjcbmaestromastercardphpvisaphpdetectorcardcreditdebit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arabhossain-php-cards-detector/health.svg)

```
[![Health](https://phpackages.com/badges/arabhossain-php-cards-detector/health.svg)](https://phpackages.com/packages/arabhossain-php-cards-detector)
```

###  Alternatives

[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

2071.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.

45445.5k1](/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.

20854.9k](/packages/nekman-luhn-algorithm)[dragon-code/card-number

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

6613.6k](/packages/dragon-code-card-number)[freelancehunt/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.

18658.7k2](/packages/freelancehunt-php-credit-card-validator)[mrprompt/cielo

Integration with Cielo gateway.

472.1k1](/packages/mrprompt-cielo)

PHPackages © 2026

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