PHPackages                             zhengbingdong/easy-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. zhengbingdong/easy-tools

ActiveLibrary

zhengbingdong/easy-tools
========================

PHP常用工具类，包含：时间类，Zip压缩解压类，数组类，英文字母类，url相关类，文件类，http协议相关类，图片类，日志类，地图类，数字类，服务器相关类，校验类，上传文件类，字符串相关操作的类，敏感字符串类，app版本校验类，操作xml类

3.1.2(5y ago)62673[1 issues](https://github.com/zhengbingdong/easy-tools/issues)MITPHPPHP &gt;=7.0

Since Jul 1Pushed 6mo ago1 watchersCompare

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

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

 PHP工具类 `持续更新中`
===============

[](#-php工具类-持续更新中)

[![Latest Stable Version](https://camo.githubusercontent.com/80589b1a1106965b7388e7c841c574d07b1389198fe5b084efe93a49c27563e5/68747470733a2f2f706f7365722e707567782e6f72672f7a6f756a696e676c692f7061792d7068702d73646b2f762f737461626c65)](https://packagist.org/packages/zhengbingdong/easy-tools)[![Total Downloads](https://camo.githubusercontent.com/e7131e2c0a8fd84b0966d42caac162ee3535e6436e5b4223baf434739797c15c/68747470733a2f2f706f7365722e707567782e6f72672f7a6f756a696e676c692f7061792d7068702d73646b2f646f776e6c6f616473)](https://packagist.org/packages/zhengbingdong/easy-tools)[![Latest Unstable Version](https://camo.githubusercontent.com/e5dd9cef5d84730f4b776c519fc5a81f23fe73888781675fd0948563b607c586/68747470733a2f2f706f7365722e707567782e6f72672f7a6f756a696e676c692f7061792d7068702d73646b2f762f756e737461626c65)](https://packagist.org/packages/zhengbingdong/easy-tools)[![License](https://camo.githubusercontent.com/16423e06ef9f59a19ca9ae85779d22971e8b2d71d3d961e27b8587138ecbe868/68747470733a2f2f706f7365722e707567782e6f72672f7a6f756a696e676c692f7061792d7068702d73646b2f6c6963656e7365)](https://packagist.org/packages/zhengbingdong/easy-tools)

##### `时间工具类`、`Zip压缩解压工具类`、`数组工具类`、`英文字母工具类`、`url相关的工具类`、`文件工具类`

[](#时间工具类zip压缩解压工具类数组工具类英文字母工具类url相关的工具类文件工具类)

##### `日志工具类`、`地图工具类`、`数字工具类`、`服务器相关的工具类`、`敏感字符串工具类`、`字符串相关操作的工具类`、`上传文件工具类`、`校验工具类`

[](#日志工具类地图工具类数字工具类服务器相关的工具类敏感字符串工具类字符串相关操作的工具类上传文件工具类校验工具类)

##### `验证类`、`app版本校验工具类`、`操作xml相关的工具类`、`图片工具类`、`http协议相关的工具类`

[](#验证类app版本校验工具类操作xml相关的工具类图片工具类http协议相关的工具类)

官网
--

[](#官网)

[共享屋素材](https://zhengbingdong.com)

更多分享信息内容请关注我的公众号：程序猿的栖息地
------------------------

[](#更多分享信息内容请关注我的公众号程序猿的栖息地)

[![程序猿的栖息地](https://camo.githubusercontent.com/6e7fa5aef26965e651aa845a4e1bb30adb9a03b9d78ee16a6bc6101570de2801/68747470733a2f2f7069632e7a68656e6762696e67646f6e672e636f6d2f746f7069632f32303233313130322f30396361386466663131323363396539366261646235353030363034623836632e6a7067)](https://camo.githubusercontent.com/6e7fa5aef26965e651aa845a4e1bb30adb9a03b9d78ee16a6bc6101570de2801/68747470733a2f2f7069632e7a68656e6762696e67646f6e672e636f6d2f746f7069632f32303233313130322f30396361386466663131323363396539366261646235353030363034623836632e6a7067)

安装
--

[](#安装)

```
$ composer require zhengbingdong/easy-tools
```

时间工具类
-----

[](#时间工具类)

```
use Zhengbingdong\EasyTools\Dates;

得到某天凌晨零点的时间戳 ：Dates::get_friend_date()

友好时间显示 ：Dates::getFriendDate()

友好时间显示 ：Dates::getFriendDate()

获取当前时间的前7天 ：Dates::getLast7Days()

获取星期几的信息 ：Dates::getWeekDay()

获取月份 ：Dates::getMonth()

```

Zip压缩解压工具类
----------

[](#zip压缩解压工具类)

```
use Zhengbingdong\EasyTools\ZipTools;

对相应目录文件进行压缩 ：ZipTools::addFileToZip()

#事例
使用示例

```

```
    $zip = new ZipArchive();
    $path = $_SERVER['DOCUMENT_ROOT'];
    $zipName = $_SERVER['DOCUMENT_ROOT']."/20180826.zip";
    if($zip->open($zipName, ZipArchive::CREATE) === TRUE){
    	addFileToZip($path, $zip); // 调用方法，对要打包的根目录进行操作，并将ZipArchive的对象传递给方法
    	$zip->close(); // 关闭处理的zip文件
    }

```

```
从zip压缩文件中提取文件 ：ZipTools::unZip()

# 事例
使用示例：
$filename = $_SERVER['DOCUMENT_ROOT'].'/unzip.zip';
$path = $_SERVER['DOCUMENT_ROOT'].'/unzip';
unZip($filename,$path );

```

数组工具类
-----

[](#数组工具类)

```
use Zhengbingdong\EasyTools\ArrayTools;
更新中...

```

英文字母工具类
-------

[](#英文字母工具类)

```
use Zhengbingdong\EasyTools\CharacterTools;
更新中...

```

url相关的工具类
---------

[](#url相关的工具类)

```
use Zhengbingdong\EasyTools\CurlsTools;
更新中...

```

文件工具类
-----

[](#文件工具类)

```
use Zhengbingdong\EasyTools\FileTools;
更新中...

```

http协议相关的工具类
------------

[](#http协议相关的工具类)

```
use Zhengbingdong\EasyTools\HttpTools;
更新中...

```

图片工具类
-----

[](#图片工具类)

```
use Zhengbingdong\EasyTools\ImageTools;
更新中...

```

日志工具类
-----

[](#日志工具类)

```
use Zhengbingdong\EasyTools\LogTools;
更新中...

```

地图工具类
-----

[](#地图工具类)

```
use Zhengbingdong\EasyTools\MapTools;
更新中...

```

数字工具类
-----

[](#数字工具类)

```
use Zhengbingdong\EasyTools\NumberTools;
更新中...

```

服务器相关的工具类
---------

[](#服务器相关的工具类)

```
use Zhengbingdong\EasyTools\ServerTools;
更新中...

```

敏感字符串工具类
--------

[](#敏感字符串工具类)

```
use Zhengbingdong\EasyTools\StrFilterTools;
更新中...

```

字符串相关操作的工具类
-----------

[](#字符串相关操作的工具类)

```
use Zhengbingdong\EasyTools\StringTools;
更新中...

```

上传文件工具类
-------

[](#上传文件工具类)

```
use Zhengbingdong\EasyTools\UploadTools;
更新中...

```

校验工具类，如验证ip、手机、邮箱等
------------------

[](#校验工具类如验证ip手机邮箱等)

```
use Zhengbingdong\EasyTools\VerifyTools;
更新中...

```

app版本校验工具类
----------

[](#app版本校验工具类)

```
use Zhengbingdong\EasyTools\VersionTools;
更新中...

```

操作xml相关的工具类
-----------

[](#操作xml相关的工具类)

```
use Zhengbingdong\EasyTools\XmlTools;
更新中...

```

License
-------

[](#license)

**MIT**

后语
--

[](#后语)

#### 欢迎Star

[](#欢迎star)

###  Health Score

33

↑

LowBetter than 75% of packages

Maintenance43

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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

Unknown

Total

1

Last Release

2139d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/640b196b81c93d5f4f212dfc4e5c80a9fb64219bab1c73524e97754e3c898e92?d=identicon)[zhengbingdong](/maintainers/zhengbingdong)

---

Top Contributors

[![zhengbingdong](https://avatars.githubusercontent.com/u/19682631?v=4)](https://github.com/zhengbingdong "zhengbingdong (60 commits)")

### Embed Badge

![Health badge](/badges/zhengbingdong-easy-tools/health.svg)

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

PHPackages © 2026

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