PHPackages                             wispiring/china-economy-classification - 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. wispiring/china-economy-classification

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

wispiring/china-economy-classification
======================================

China National Economy Classification Codes 国民经济行业分类与代码 GB4754-2011

v0.3.0(10y ago)6481MITPHP

Since Apr 17Pushed 9y ago2 watchersCompare

[ Source](https://github.com/wispiring/China-Economy-Classification)[ Packagist](https://packagist.org/packages/wispiring/china-economy-classification)[ Docs](https://github.com/wispiring/China-Economy-Classification)[ RSS](/packages/wispiring-china-economy-classification/feed)WikiDiscussions master Synced today

READMEChangelog (4)DependenciesVersions (5)Used By (0)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/93b4536a9674c30beb249b01b70add6ab4b263fdc25cd0cde9be244d513b8833/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776973706972696e672f4368696e612d45636f6e6f6d792d436c617373696669636174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wispiring/China-Economy-Classification/?branch=master)[![Build Status](https://camo.githubusercontent.com/b68da06b5cbf687741d1aa3f684eda5edda6f934dbe0677dc277c6014850d433/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776973706972696e672f4368696e612d45636f6e6f6d792d436c617373696669636174696f6e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wispiring/China-Economy-Classification/build-status/master)

China Economy Classification Codes
==================================

[](#china-economy-classification-codes)

国民经济行业分类与代码
-----------

[](#国民经济行业分类与代码)

A PHP library to get the GB/5754 codes.

China National Economy Classification Codes GB/4754-2011.

国民经济行业分类与代码（GB/4754-2011），国民经济行业分类。

A 农、林、牧、渔业； B 采矿业； C 制造业； D 电力、热力、燃气及水生产和供应业； E 建筑业； F 批发和零售业； G 交通运输、仓储和邮政业； H 住宿和餐饮业； I 信息传输、软件和信息技术服务业； J 金融业； K 房地产业； L 租赁和商务服务业； M 科学研究和技术服务业； N 水利、环境和公共设施管理业； O 居民服务、修理和其他服务业； P 教育； Q 卫生和社会工作； R 文化、体育和娱乐业； S 公共管理、社会保障和社会组织； T 国际组织

《国民经济行业分类》国家标准于1984年首次发布，分别于1994年和2002年进行修订，2011年第三次修订。该标准（GB/T 4754-2011）由国家统计局起草，国家质量监督检验检疫总局、国家标准化管理委员会批准发布，并将于2011年11月1日实施。 此次修订除参照2008年联合国新修订的《国际标准行业分类》修订四版（简称：ISIC4）外，主要依据我国近年来经济发展状况和趋势，对门类、大类、中类、小类做了调整和修改。

新国家标准《国民经济行业分类》（GB/T4754-2011）经国家质量监督检验检疫总局、国家标准化管理委员会批准发布，并将于2011年11月1日实施。根据统计工作的实际情况，从2012年定报统一开始使用。

Installation
------------

[](#installation)

```
composer require wispiring/china-economy-classification

```

Usage
-----

[](#usage)

```
$classification = new \Wispiring\ChinaEconomyClassification\Classification();

// Get array of all the codes
$data = $classification->getArray();

// Get by code
$data = $classification->getByCode('0141');

// Get by name
$data = $classification->getByName('超级市场零售');

// Get codes by category
$data = $classification->getByTopCategory('A');
$data = $classification->getByFirstCategory('51');
$data = $classification->getBySecondCategory('389');
$data = $classification->getByThirdCategory('0141');
```

Generating HTML select element
------------------------------

[](#generating-html-select-element)

Examples can be found in the example dir

```
# single select

$classification = new \Wispiring\ChinaEconomyClassification\Classification();
// passing the name of the select widget as parameter
echo $classification->getSelectWidget('cec');
// passing both the name and the selected value
echo $classification->getSelectWidget('cec', '3399');

# 4 select combo - the cec.js is required, no other JavaScript libs needed

$classification = new \Wispiring\ChinaEconomyClassification\Classification();

echo ''.file_get_contents('../assets/cec.js').'';

echo $classification->getSelectWidget4('cec', '1810');
echo $classification->getSelectWidget4('test', '7724');
echo $classification->getSelectWidget4('test2');
```

Use in Symfony forms
--------------------

[](#use-in-symfony-forms)

```
$classification = new \Wispiring\ChinaEconomyClassification\Classification();

// Get array for select html widget
$data = $classification->getSelectArray();
```

Please refer to the [concrete example](example/select.php).

License
-------

[](#license)

This software is licensed under the [MIT License](LICENSE).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

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

Total

4

Last Release

3683d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b784da6e9b890f576cd3cac29511978c10afc0e3b9572b498f2841952d953ef?d=identicon)[h-wang](/maintainers/h-wang)

---

Top Contributors

[![h-wang](https://avatars.githubusercontent.com/u/3410322?v=4)](https://github.com/h-wang "h-wang (11 commits)")

---

Tags

classificationChinaeconomyHongliangWispiring2011GB47544754

### Embed Badge

![Health badge](/badges/wispiring-china-economy-classification/health.svg)

```
[![Health](https://phpackages.com/badges/wispiring-china-economy-classification/health.svg)](https://phpackages.com/packages/wispiring-china-economy-classification)
```

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.5M28](/packages/rubix-ml)[medz/gb-t-2260

中华人民共和国国家标准 GB/T 2260 行政区划代码

10664.0k5](/packages/medz-gb-t-2260)[alicfeng/identity-card

IdentityCard Library

1228.7k](/packages/alicfeng-identity-card)[sylius/taxonomy

Taxonomies - categorization of domain models in PHP projects.

14451.5k15](/packages/sylius-taxonomy)

PHPackages © 2026

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