PHPackages                             mcred/detect-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mcred/detect-credit-card-type

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

mcred/detect-credit-card-type
=============================

Utility to determine credit card type by PAN

0.1.0(8y ago)16672.4k↓20.7%131MITPHP

Since Jul 1Pushed 8y ago2 watchersCompare

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

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

Detect Credit Card Types
========================

[](#detect-credit-card-types)

[![Build Status](https://camo.githubusercontent.com/da7e4d65f25c7c90126bfe8c1f32b8a452ad40f9c3db14bf0f1ff0b1fa0ceabd/68747470733a2f2f7472617669732d63692e6f72672f6d637265642f6465746563742d6372656469742d636172642d747970652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mcred/detect-credit-card-type)[![Code Climate](https://camo.githubusercontent.com/aff05bc347ee84cdcce2ae6800d9a39ad85ecca3410b74e44c5532297a29e491/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d637265642f6465746563742d6372656469742d636172642d747970652f6261646765732f6770612e737667)](https://codeclimate.com/github/mcred/detect-credit-card-type)[![Test Coverage](https://camo.githubusercontent.com/ddd975df4f355dd4f6372e3132e7dd858b9b88db4f36370bb085672f31fee754/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d637265642f6465746563742d6372656469742d636172642d747970652f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/mcred/detect-credit-card-type/coverage)[![Latest Version on Packagist](https://camo.githubusercontent.com/0550957bc9e7b064e9b9068ac90f9a3a2d6429603410fea5ccdc2ff1632fb983/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d637265642f6465746563742d6372656469742d636172642d747970652e7376673f7374796c653d666c6174)](https://packagist.org/packages/mcred/detect-credit-card-type)[![Total Downloads](https://camo.githubusercontent.com/04c4e9bd8770b63dee9243b2be57858fb88268ad9dd31b47ebc9fc5fec9e8f62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d637265642f6465746563742d6372656469742d636172642d747970652e7376673f7374796c653d666c6174)](https://packagist.org/packages/mcred/detect-credit-card-type)

Utility to determine credit card type by PAN

### Installation

[](#installation)

```
composer require mcred/detect-credit-card-type

```

### Usage

[](#usage)

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

$detector = new CardDetect\Detector();
$card = '4111111111111111';

echo $detector->detect($card); //Visa

```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity47

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity56

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

Total

3

Last Release

3128d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d400fcda1eb126ef813f1c52395ec225e6b00d9404458b26a36ce504f9b04c7?d=identicon)[mcred](/maintainers/mcred)

---

Top Contributors

[![mcred](https://avatars.githubusercontent.com/u/4326032?v=4)](https://github.com/mcred "mcred (28 commits)")

---

Tags

code-climatecomposerphp7test-driven-developmenttravis-ci

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[russ666/yii2-countdown

jQuery countdown widget for Yii2

11100.0k](/packages/russ666-yii2-countdown)

PHPackages © 2026

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