PHPackages                             bugtao/array\_utils - 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. bugtao/array\_utils

ActiveLibrary

bugtao/array\_utils
===================

php array

1.0.0(4y ago)118MITPHP

Since Jun 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bugtao123/array_utils)[ Packagist](https://packagist.org/packages/bugtao/array_utils)[ RSS](/packages/bugtao-array-utils/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

array\_utils
============

[](#array_utils)

**composer require bugtao/array\_utils**

```
use ArrayUtils\Main

    /**
     * 列表转树
     * @param $list 被转列表数据
     * @param string $id 主键字段默认id
     * @param string $pid 外建字段默认pid
     * @param string $child 存放下级字段默认children
     * @param int $root 第一级父id 默认0
     * @return array
     */
    Main::getTree('you list', 'id', 'pid', 'children', 0)

    /**
     * 树转列表
     * @param $tree 被转树数据
     * @param string $child 树中存放下级字段
     * @param string $prefix 返回前缀默认‘-’
     * @return array|mixed
     */
    Main::getList($tree, 'children', "-")

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

1788d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ffc9e1c5182d8b8f1bedddfc31b23ac3ff5959c10b956086610f41951bd8f38?d=identicon)[bugtao123](/maintainers/bugtao123)

---

Top Contributors

[![bugtao123](https://avatars.githubusercontent.com/u/43465025?v=4)](https://github.com/bugtao123 "bugtao123 (5 commits)")

### Embed Badge

![Health badge](/badges/bugtao-array-utils/health.svg)

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

PHPackages © 2026

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