PHPackages                             tf-pro/chinese - 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. tf-pro/chinese

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

tf-pro/chinese
==============

获取汉字的拼音, 或者简繁体转换.

1.0.3(4y ago)132MITPHP

Since Feb 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/taofei-pro/chinese)[ Packagist](https://packagist.org/packages/tf-pro/chinese)[ Docs](https://github.com/taofei-pro/chinese)[ RSS](/packages/tf-pro-chinese/feed)WikiDiscussions master Synced 1w ago

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

Chinese
=======

[](#chinese)

获取汉字的拼音, 或者简繁体转换

安装方法
====

[](#安装方法)

命令行下, 执行 composer 命令安装:

```
composer require tf-pro/chinese

```

使用示例
====

[](#使用示例)

```
use TFPro\Chinese\Chinese;

$chs = '中国人';
$cht = '中國人';

// 简繁体获取拼音
var_dump(Chinese::pinyin($chs));
var_dump(Chinese::pinyin($cht));

// 简繁体转换
var_dump(Chinese::turn($chs));
var_dump(Chinese::turn($cht, true));

```

关于部分无法正确转换
==========

[](#关于部分无法正确转换)

> 可以自行补充 src/ 下 Dict.php 中的字典

###  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

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

Total

4

Last Release

1803d ago

### Community

Maintainers

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

---

Top Contributors

[![taofei-pro](https://avatars.githubusercontent.com/u/28079815?v=4)](https://github.com/taofei-pro "taofei-pro (12 commits)")

---

Tags

PinyinChinesehanzijiantifanti

### Embed Badge

![Health badge](/badges/tf-pro-chinese/health.svg)

```
[![Health](https://phpackages.com/badges/tf-pro-chinese/health.svg)](https://phpackages.com/packages/tf-pro-chinese)
```

###  Alternatives

[overtrue/pinyin

Chinese to pinyin translator.

4.5k6.5M72](/packages/overtrue-pinyin)[zhuzhichao/ip-location-zh

get the ip's location info with Chinese

617212.5k11](/packages/zhuzhichao-ip-location-zh)[overtrue/chinese-calendar

中国农历转换与查询工具

557103.7k4](/packages/overtrue-chinese-calendar)[zhuzhichao/bank-card-info

Get the bank card info

45464.8k](/packages/zhuzhichao-bank-card-info)[douyasi/identity-card

Chinese Identity Card package

17851.4k3](/packages/douyasi-identity-card)[thl/pinyin

Romanization tool for Traditional Chinese

2519.1k](/packages/thl-pinyin)

PHPackages © 2026

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