PHPackages                             maosiji/luphp - 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. maosiji/luphp

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

maosiji/luphp
=============

更快的做一些 PHP、WordPress 的开发

1.0.0(1y ago)077↑1900%MITPHP

Since Dec 10Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/maosiji/luphp)[ Packagist](https://packagist.org/packages/maosiji/luphp)[ RSS](/packages/maosiji-luphp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

luphp
=====

[](#luphp)

封装一些常用功能，便于快速开发（测试中...）

Original
--------

[](#original)

### 1、LuUrl

[](#1luurl)

```
// 获取当前网页链接
get(): string
// 更新指定参数后的链接（追加 + 更新值）
update_params( array $arr, string $url = '' ): string
// 删除指定参数后的链接
delete_params( array $arr, string $url = '' ): string
```

### 2、LUSend

[](#2lusend)

```
// 发送数组数据
send_array( int $code, string $msg, $data='', string $reload='0', array $newArr=array() ): array
// 发送json数据并终止程序
send_json( int $code, string $msg, $data='', string $reload='0', array $newArr=array() )
```

### 5、LuCurl

[](#5lucurl)

```
get(string $url, array $headers = [], bool $overwrite = false): array
post(string $url, array $data, array $headers = [], bool $overwrite = false): array
put(string $url, array $data, array $headers = [], bool $overwrite = false): array
delete(string $url, array $data = [], array $headers = [], bool $overwrite = false): array
patch(string $url, array $data, array $headers = [], bool $overwrite = false): array
```

### 6、LuSafe

[](#6lusafe)

```
// 断是否连续点击 ajax 按钮，并禁止
check_too_many_requests(int $timediff = 5)
```

### 7、LuTime

[](#7lutime)

```
// 返回时间间隔数组 array('day'=>'', 'hour'=>'', 'min'=>'', 'sec=>'')
calculate_timediff ( int $begin_time, int $end_time ): array
```

### 8、LURandom

[](#8lurandom)

```
// 获取指定位数的随机数
rand_number(int $length = 6, bool $is_first_zero = true): string
// 返回0到9之间的奇数
rand_odd(): int
// 返回0到9之间的偶数
rand_even(): int
```

### 9、LuVersion

[](#9luversion)

```
// 检测版本号格式是否正确
check_version ( string $version ): bool
```

### 10、LUNo19

[](#10luno19)

```
create( $prefix='0755', int $pos=2, int $sex=0 ): string
verify( $id19Number, int $pos=2 ): bool
```

### 11、LUPrice

[](#11luprice)

```
format( $price ): float
```

### 12、LUIdcard

[](#12luidcard)

```
// 是否是合法身份证号
is(string $idCard): bool
// 返回性别，1 男，2 女
sex(string $idCard): int
// 返回生日，1980-02-03
birthday(string $idCard): string
// 返回省级，北京市、台湾省、香港特别行政区
province(string $idCard): string
```

wordpress
---------

[](#wordpress)

### 1、LUWPSend

[](#1luwpsend)

```
// 用 wp_send_json 发送数据
send_json(int $code, string $msg, $data = '', string $reload = '', array $newArr = [], int $flags = 0)
```

### 2、LUWPNonce

[](#2luwpnonce)

```
create_nonce( string $str ): string
verify_nonce( string $nonce, string $str ): bool
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance68

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

524d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/89b87dfac833b47e6e2c4915615289b6583a669f6516529c42dcd3530f024a4a?d=identicon)[maosiji](/maintainers/maosiji)

---

Top Contributors

[![maosiji](https://avatars.githubusercontent.com/u/60009637?v=4)](https://github.com/maosiji "maosiji (1 commits)")

### Embed Badge

![Health badge](/badges/maosiji-luphp/health.svg)

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

###  Alternatives

[opendialogai/webchat

Webchat front end component for the Open Dialog project

1512.7k](/packages/opendialogai-webchat)

PHPackages © 2026

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