PHPackages                             juhedata/common-tools - 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. juhedata/common-tools

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

juhedata/common-tools
=====================

common function and verify function for php

v1.1.17(1y ago)48.0k↓82.6%MITPHP

Since Jun 13Pushed 1y agoCompare

[ Source](https://github.com/juhedata/common-tools)[ Packagist](https://packagist.org/packages/juhedata/common-tools)[ RSS](/packages/juhedata-common-tools/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (31)Used By (0)

常规校验和生成集合
---------

[](#常规校验和生成集合)

```
//composer安装

composer require juhedata/common-tools

```

#### 常规校验

[](#常规校验)

```
Verify::isWeChat($userAgent);//校验是否是微信内打开

Verify::isMobileServer($server);//校验是否是移动设备访问

Verify::isMobilePhone($mobile,[$strict = false]);//校验手机号格式

Verify::isMobilePhones($mobiles,[$strict = false]);//校验手机号格式(多手机号)

Verify::isInt($val,$len);//校验整数

Verify::isIdCard($idCard);//校验身份证号:修复校验规则

Verify::isEmail($email);//校验邮箱，排除临时邮箱

Verify::isMoney($money, $limit );//金额格式校验，保留小数位$limit

Verify::isChinese($val);//字母数字中文校验

```

#### 常用生成

[](#常用生成)

```
    //格式化生成,format=YmdHis,randNum:补充随机数 $sec:是否使用毫秒默认true
   Create::createOrderNoFormat($prefix, $format, $randNum,$sec) ;

   Create::randString($length, $normal) ;//生成随机字符串

   Create::fileToDownload($file, $fileName,$contentType) ;//文件下载

   Create::shortStr($input,$len) ;//生成短链

   Create::encodingArr($array, $to_encoding, $from_encoding ) ;//数组字符集转换

   Create::halfReplace($string, $symbol ) ;//将字符串后半部分替换成指定字符

   Create::replaceWithStar($str, $symbol);//将一个字符的中间1/3替换成指定字符

   Create::moneyToString($money);//将数值金额转换为中文大写金额

   Create::shortTime($string);//当年时间短日期

```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance43

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 97.4% 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 ~75 days

Recently: every ~403 days

Total

29

Last Release

459d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8eaea22e75e1ebee47617e0085720b07829ebfbd14e865878eb1853ecdddacd0?d=identicon)[xwzgit](/maintainers/xwzgit)

---

Top Contributors

[![juheapis](https://avatars.githubusercontent.com/u/204961774?v=4)](https://github.com/juheapis "juheapis (38 commits)")[![nookery](https://avatars.githubusercontent.com/u/5194193?v=4)](https://github.com/nookery "nookery (1 commits)")

---

Tags

commonverify

### Embed Badge

![Health badge](/badges/juhedata-common-tools/health.svg)

```
[![Health](https://phpackages.com/badges/juhedata-common-tools/health.svg)](https://phpackages.com/packages/juhedata-common-tools)
```

###  Alternatives

[phpoffice/common

PHPOffice Common

23812.8M36](/packages/phpoffice-common)[prooph/common

Common classes used across prooph packages

842.2M28](/packages/prooph-common)[kigkonsult/iptools

ipv4/ipv6 tools

1183.1k](/packages/kigkonsult-iptools)

PHPackages © 2026

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