PHPackages                             liberram/packagetest - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. liberram/packagetest

ActiveLibrary[Testing &amp; Quality](/categories/testing)

liberram/packagetest
====================

a test package

1.1.x-dev(5y ago)011MITPHPPHP &gt;=5.4

Since Feb 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/adenjobs/packageteste)[ Packagist](https://packagist.org/packages/liberram/packagetest)[ RSS](/packages/liberram-packagetest/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

PHP常用辅助函数库
==========

[](#php常用辅助函数库)

[![Total Downloads](https://camo.githubusercontent.com/fa5a9d7e0909ba99694ccb34edfe64d6b79f721bc53bfba059cd348fbcd96c88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6962657272616d2f7061636b61676574657374)](https://packagist.org/packages/liberram/packagetest)[![Latest Stable Version](https://camo.githubusercontent.com/23830021b86554cc4ae2b33c64689617f8eb56a018b2c44171be6e1a08d57c91/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6962657272616d2f7061636b61676574657374)](https://packagist.org/packages/liberram/packagetest)[![License](https://camo.githubusercontent.com/0706db5f6acd75a76d295afccad7269c00b3ebd27b4388008f218c8fa3cec2ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6962657272616d2f7061636b61676574657374)](https://packagist.org/packages/liberram/packagetest)

安装
--

[](#安装)

`composer require liberram/packagetest`

内置函数
----

[](#内置函数)

### json字符串解析

[](#json字符串解析)

`Helper::analyJson($json_str)`

### 生成随机汉字字符串

[](#生成随机汉字字符串)

`Helper::getHanChar($num)`

### 判断颜色是深色还是浅色

[](#判断颜色是深色还是浅色)

`Helper::darkOrLight($color_r , $color_g , $color_b)`

### 16进制颜色转rgb

[](#16进制颜色转rgb)

`Helper::hex2rgb($color)`

### 颜色反转，由浅色转深色或由深色转浅色

[](#颜色反转由浅色转深色或由深色转浅色)

`Helper::colorReverse($color ,$to_dark_or_light = 1)`

### 生成随机色块头像

[](#生成随机色块头像)

`Helper::randAvatar($str = '' , $width = 200)`![image]()

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.4% 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 ~0 days

Total

2

Last Release

1908d ago

### Community

Maintainers

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

---

Top Contributors

[![Domaker](https://avatars.githubusercontent.com/u/7956518?v=4)](https://github.com/Domaker "Domaker (10 commits)")[![menlain](https://avatars.githubusercontent.com/u/66734771?v=4)](https://github.com/menlain "menlain (4 commits)")

### Embed Badge

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

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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