PHPackages                             toolkit/toolkit - 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. [CLI &amp; Console](/categories/cli)
4. /
5. toolkit/toolkit

ActiveLibrary[CLI &amp; Console](/categories/cli)

toolkit/toolkit
===============

some useful library of the php

v1.0.5(7y ago)15621MITPHPPHP &gt;7.1.0

Since Apr 22Pushed 5y ago2 watchersCompare

[ Source](https://github.com/php-toolkit/toolkit)[ Packagist](https://packagist.org/packages/toolkit/toolkit)[ Docs](https://github.com/php-toolkit/toolkit)[ RSS](/packages/toolkit-toolkit/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (6)Used By (1)

PHP工具包
======

[](#php工具包)

[![Php Version](https://camo.githubusercontent.com/d90f27811e67c164d7cb22e93d0a6020a77beed41f0790469d90188fd42c57f5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e312e302d627269676874677265656e2e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/toolkit/str-utils)

php的一些有用的基础工具库实现和收集整理。

> 本仓库是主仓库，开发后推送到各个组件仓库。如果只需要一个或部分工具，可以单独配置require

**1. 字符串工具**

常用的字符串操作帮助工具类库，以及一些 html，json 编解码， token，url 等工具类

- 独立包名 [toolkit/str-utils](https://github.com/php-toolkit/str-utils)
- 在本仓库的 [libs/str-utils](libs/str-utils)

**2. 数组工具**

常用的数组操作帮助工具类库

- 独立包名 [toolkit/arr-utils](https://github.com/php-toolkit/arr-utils)
- 在本仓库的 [libs/arr-utils](libs/arr-utils)

**3. 对象工具**

常用的对象操作帮助工具类、traits库

- 独立包名 [toolkit/obj-utils](https://github.com/php-toolkit/obj-utils)
- 在本仓库的 [libs/obj-utils](libs/obj-utils)

**4. 系统工具**

常用的系统操作帮助工具类库。系统环境信息，执行命令，简单的进程操作使用类（fork,run,stop,wait ...）等

- 独立包名 [toolkit/sys-utils](https://github.com/php-toolkit/sys-utils)
- 在本仓库的 [libs/sys-utils](libs/sys-utils)

**5. php工具**

常用的php操作帮助工具类库。php环境信息，数据打印，`.env`加载，简单的autoload类等

- 独立包名 [toolkit/php-utils](https://github.com/php-toolkit/php-utils)
- 在本仓库的 [libs/php-utils](libs/php-utils)

**6. 文件系统工具**

常用的文件系统操作帮助工具类库。文件查找，创建，判断，信息获取，内容读取等，目录的创建，权限，拷贝，删除等。

- 独立包名 [toolkit/file-utils](https://github.com/php-toolkit/file-utils)
- 在本仓库的 [libs/file-utils](libs/file-utils)

**7. CLI工具**

常用的php cli环境的帮助工具类库。cli下的内容输出，读取。丰富的颜色内容输出，cli下的php文件高亮，简单的光标操作。

- 独立包名 [toolkit/cli-utils](https://github.com/php-toolkit/cli-utils)
- 在本仓库的 [libs/cli-utils](libs/cli-utils)

**8. 数据收集器**

数据收集器 `Collection` 实现。可用于配置数据管理、数据收集、数据迭代等。

- 独立包名 [toolkit/collection](https://github.com/php-toolkit/collection)
- 在本仓库的 [libs/collection](libs/collection)

**9. 简单的DI容器实现**

简单的 `psr/container` 对象管理容器实现

- 独立包名 [toolkit/di](https://github.com/php-toolkit/di)
- 在本仓库的 [libs/di](libs/di)

**10. 数据解析器**

数据解析器。`json` `php` `swoole` `msgpack` 格式的数据解析的简单封装。

- 独立包名 [toolkit/data-parser](https://github.com/php-toolkit/data-parser)
- 在本仓库的 [libs/data-parser](libs/data-parser)

**11. 额外的帮助类库**

额外的帮助类库。数据、日期、格式化等帮助类。 简单的 config,options,event,alias等traits收集整理

- 独立包名 [toolkit/helper-utils](https://github.com/php-toolkit/helper-utils)
- 在本仓库的 [libs/helper-utils](libs/helper-utils)

安装
--

[](#安装)

```
composer require toolkit/toolkit
```

文档
--

[](#文档)

- classes docs

开发
--

[](#开发)

```
composer install
php toolkit dev -h
```

### git subtree

[](#git-subtree)

git subtree usage example:

- add a lib repo

```
git subtree add --prefix=libs/php-utils https://github.com/php-toolkit/php-utils master --squash
```

- update a lib repo

```
git subtree pull --prefix=libs/php-utils https://github.com/php-toolkit/php-utils master --squash
```

- push a lib repo

```
git subtree push --prefix=libs/php-utils https://github.com/php-toolkit/php-utils master
```

License
-------

[](#license)

MIT

我的其他项目
------

[](#我的其他项目)

- **`inhere/console`** 功能丰富的命令行应用，命令行工具库
    - git repo [github](https://github.com/inhere/php-console) [gitee](https://gitee.com/inhere/php-console)
- **`inhere/php-validate`** 一个简洁小巧且功能完善的php验证库。仅有几个文件，无依赖。
    - git repo [github](https://github.com/inhere/php-validate) [gitee](https://gitee.com/inhere/php-validate)
- **`inhere/sroute`** 轻量且快速的路由库
    - git repo [github](https://github.com/inhere/php-srouter) [gitee](https://gitee.com/inhere/php-srouter)
- **`inhere/event-manager`** psr-14 的事件管理实现
    - git repo [github](https://github.com/inhere/php-event-manager) [gitee](https://gitee.com/inhere/php-event-manager)
- **`inhere/middleware`** psr-15 HTTP中间件的实现
    - git repo [github](https://github.com/inhere/php-middleware) [gitee](https://gitee.com/inhere/php-middleware)

> 更多请查看我的 [github](https://github.com/inhere)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

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

Total

4

Last Release

2680d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.0.5PHP &gt;7.1.0

### Community

Maintainers

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

---

Top Contributors

[![inhere](https://avatars.githubusercontent.com/u/5302062?v=4)](https://github.com/inhere "inhere (164 commits)")

---

Tags

clicollectiondependency-injectionfilesystemphpsystemtraitphplibrarytools

### Embed Badge

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

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

###  Alternatives

[nunomaduro/phpinsights

Instant PHP quality checks from your console.

5.6k10.8M426](/packages/nunomaduro-phpinsights)[ollyxar/php-malware-detector

PHP malware detector

12926.4k](/packages/ollyxar-php-malware-detector)[toolkit/cli-utils

useful cli tool library of the php

20222.1k16](/packages/toolkit-cli-utils)

PHPackages © 2026

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