PHPackages                             zudar/china-id - 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. zudar/china-id

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

zudar/china-id
==============

中国公民身份证号码验证，解析，生成

1.1.0(9y ago)4863MITPHPPHP &gt;=5.3.0

Since Feb 22Pushed 9y ago2 watchersCompare

[ Source](https://github.com/zudar/china-id)[ Packagist](https://packagist.org/packages/zudar/china-id)[ RSS](/packages/zudar-china-id/feed)WikiDiscussions master Synced today

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

china-id
========

[](#china-id)

中国身份证号码解析，验证及生成

身份证号码验证

```

$id=new ID18('320706199108093125');
$id->isValidate();

```

身份证号码解析

```

$id=new ID18();
$id->setIdNum('320706199108093125');
$id->getBirthday();//出生日期
$id->getArea();//地区
Gender::getDesc($id->getGender());//性别

```

身份证号码生成

```

$id=new ID18();
for($i=0;$igenerate();//生成身份证号码
    $id->setIdNum($idNum);
    echo $id;
}

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

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

3414d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6973556?v=4)[zudar](/maintainers/zudar)[@zudar](https://github.com/zudar)

---

Top Contributors

[![zudar](https://avatars.githubusercontent.com/u/6973556?v=4)](https://github.com/zudar "zudar (2 commits)")

---

Tags

idChinaChina ID

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zudar-china-id/health.svg)

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

###  Alternatives

[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k365.0M3.1k](/packages/symfony-cache)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6513.9M11](/packages/aporat-store-receipt-validator)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M182](/packages/api-platform-metadata)[typo3/html-sanitizer

HTML sanitizer aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values.

2910.3M6](/packages/typo3-html-sanitizer)

PHPackages © 2026

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