PHPackages                             jliu/helper - 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. jliu/helper

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

jliu/helper
===========

The PHP Helper Package

v1.2(8y ago)217Apache-2.0PHP

Since Apr 11Pushed 8y ago2 watchersCompare

[ Source](https://github.com/liujin0506/jliu-helper)[ Packagist](https://packagist.org/packages/jliu/helper)[ RSS](/packages/jliu-helper/feed)WikiDiscussions master Synced 2mo ago

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

php 常用的一些扩展类库
=============

[](#php-常用的一些扩展类库)

> 更新完善中

> 以下类库都在`\\jliu\\helper`命名空间下

公共函数
----

[](#公共函数)

```
// 是否为手机号
isMobile('18888888888');

// 随机数
random($length, $numeric = false)

// 字符串截取，支持中文和其他编码
msubstr($str, $start, $length, $charset = "utf-8", $suffix = true)
```

Random
------

[](#random)

> 随机数操作

```
// 生成随机数
Random::number($length)

// 生成唯一编号
Random::code()

```

Validate
--------

[](#validate)

> 验证

```
// 验证手机号是否正确
Validate::isMobile($text)

// 验证密码是否正确
Validate::isPassword($password)

// 验证邮箱是否正确
Validate::isEmail($mail)

// 验证用户名是否正确
Validate::isUserName($username)

// 验证身份证号码格式是否正确
Validate::isIdCard($id_card)

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

3

Last Release

2949d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

php

### Embed Badge

![Health badge](/badges/jliu-helper/health.svg)

```
[![Health](https://phpackages.com/badges/jliu-helper/health.svg)](https://phpackages.com/packages/jliu-helper)
```

###  Alternatives

[ichtrojan/laravel-location

2102.9k](/packages/ichtrojan-laravel-location)[spirit55555/php-minecraft

Useful PHP classes for Minecraft

6823.6k](/packages/spirit55555-php-minecraft)

PHPackages © 2026

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