PHPackages                             cjade/id-card - 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. cjade/id-card

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

cjade/id-card
=============

Obtain user information through id card 身份证

v1.1.0(7y ago)129MITPHPPHP &gt;=5.6.0

Since Jun 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/cjade/id-card)[ Packagist](https://packagist.org/packages/cjade/id-card)[ RSS](/packages/cjade-id-card/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (2)Used By (0)

idcard
------

[](#idcard)

二代身份证号码验证，可用于验证二代身份证号码是否合法、从身份证号码中获取生日/性别/年龄/地区信息

### 安装

[](#安装)

```
composer require cjade/id-card
```

### 环境要求

[](#环境要求)

- PHP &gt;= 5.6.0

### 使用方法

[](#使用方法)

```
use IdCard\IdCard;

$idCard = IdCard::create();
$idCard->setId('******************');
或者
$idCard = IdCard::create('******************');

// 获取生日，格式YYYY mm dd
$identity->getBirthday('-');
// 2018-06-01
$identity->getBirthday('/');
// 2018/06/01

//验证身份证号码格式是否正确
idCard = IdCard::create('******************');
$result = $idCard->check()
//true或false
或者
$idCard = IdCard::create('******************')->check();
//true或false

//获取身份证号
$id = $idCard->getId();

//
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

2902d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d749c967f93c991c44fdfe15ba2823f31adda23cab907f27087c1d5670e35c64?d=identicon)[cjade](/maintainers/cjade)

---

Top Contributors

[![cjade](https://avatars.githubusercontent.com/u/18133290?v=4)](https://github.com/cjade "cjade (16 commits)")

### Embed Badge

![Health badge](/badges/cjade-id-card/health.svg)

```
[![Health](https://phpackages.com/badges/cjade-id-card/health.svg)](https://phpackages.com/packages/cjade-id-card)
```

###  Alternatives

[league/glide-symfony

Glide adapter for Symfony

1025.7M27](/packages/league-glide-symfony)[codercat/jwk-to-pem

Convert JWK to PEM format.

1004.5M20](/packages/codercat-jwk-to-pem)[typisttech/imposter

Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.

111286.6k1](/packages/typisttech-imposter)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[mkraemer/react-pcntl

PCNTL bindings for ReactPHP

57289.0k9](/packages/mkraemer-react-pcntl)

PHPackages © 2026

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