PHPackages                             witchy/phptool - 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. witchy/phptool

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

witchy/phptool
==============

php 工具包

1.1.4(4y ago)012Apache-2.0PHPPHP &gt;=7.0.0

Since Nov 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/witchycq/phptool)[ Packagist](https://packagist.org/packages/witchy/phptool)[ Docs](https://github.com/witchycq/phptool)[ RSS](/packages/witchy-phptool/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

php常用工具包
--------

[](#php常用工具包)

\###1. 无限极分类

```
use witchy\phptool\tree\Unlimit;

...
/**
 * 获取指定结点的树状数据(多维数组)
 */
$pt_unlimit = new Unlimit();
$getAllChild_result = $obj->getAllChild($data);

/**
 * 获取指定结点的所有子节点 包含自己
 */
$getAllChild_result = $pt_unlimit->getAllChild($data, 1);

/**
 * 获取指定结点的所有父节点 包含自己
 */
$getParentByChild_result = $pt_unlimit->getParentByChild($data, 6);

/**
 * 获取指定结点的一级结点数据
 */
$one = $pt_unlimit->getOne($data, 1);

```

\###2. 测试用例 定位到和vender同级的目录

./vendor/bin/phpunit tests/TreeTest.php

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

1645d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2679393?v=4)[witchy](/maintainers/witchy)[@witchy](https://github.com/witchy)

---

Top Contributors

[![wdk996](https://avatars.githubusercontent.com/u/12706828?v=4)](https://github.com/wdk996 "wdk996 (11 commits)")

---

Tags

libraryphptools

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[league/iso3166

ISO 3166-1 PHP Library

69536.3M116](/packages/league-iso3166)[league/statsd

A simple library for working with StatsD in PHP.

3514.3M12](/packages/league-statsd)[payum/iso4217

ISO 4217 PHP Library

16312.1M5](/packages/payum-iso4217)[lambdish/phunctional

λ PHP functional library

3612.0M23](/packages/lambdish-phunctional)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)

PHPackages © 2026

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