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.3.0(2mo ago)189↓89.3%MITPHPPHP ^7.0

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 today

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

luphp
=====

[](#luphp)

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

Exception
---------

[](#exception)

类名介绍异常码前缀LURandom随机数100LUEncryptor加解密110LUIdcard身份证号码120LUIpIP识别130LUVerifiableNumber1919位可验证数字生成140LUVerifiableString1818位可验证字符串生成141LUURLurl操作150LUSessionsession160LUFile文件上传300LUWPFileWP文件上传310LUApiSignerAPI签名验证400LUDBSQL数据库900Original
--------

[](#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

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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

Every ~507 days

Total

2

Last Release

63d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/60009637?v=4)[猫斯基](/maintainers/maosiji)[@maosiji](https://github.com/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

[stfalcon/tinymce-bundle

This Bundle integrates TinyMCE WYSIWYG editor into a Symfony2 project.

2553.0M24](/packages/stfalcon-tinymce-bundle)[reinink/remember-query-strings

Laravel middleware that automatically remembers and restores query strings.

76660.1k3](/packages/reinink-remember-query-strings)[ademarre/binary-to-text-php

Collection of binary-to-text encoding utilities for PHP. Includes Base32 support and much more.

39172.5k](/packages/ademarre-binary-to-text-php)[corneltek/formkit

242.9k2](/packages/corneltek-formkit)[wdev-rs/laravel-analytics

Collect page view data in your application without third party tracking

151.2k](/packages/wdev-rs-laravel-analytics)

PHPackages © 2026

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