PHPackages                             yii-tool/helpers - 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. yii-tool/helpers

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

yii-tool/helpers
================

Yii 2.0 tools

1.1(2y ago)12.0k↓25%PHP

Since Jun 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/longfeiRen/yiihelpers)[ Packagist](https://packagist.org/packages/yii-tool/helpers)[ RSS](/packages/yii-tool-helpers/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

常用函数工具
------

[](#常用函数工具)

### 系统工具

[](#系统工具)

```
// 单例实例化
$client = \Yii\Helpers\make(\GuzzleHttp\Client::class);
// 单例实例化，带参数
$client = \Yii\Helpers\make(\GuzzleHttp\Client::class, ['base_uri' => 'http://baidu.com']);
// 读取配置文件
echo \Yii\Helpers\config('upload.url');
```

### 时间处理

[](#时间处理)

#### 转中国时间, 默认俄时区

[](#转中国时间-默认俄时区)

```
echo \Yii\Helpers\cnDate("2024-05-01 16:00:00");
```

#### 根据环境转时间

[](#根据环境转时间)

```
echo \Yii\Helpers\autoDate("2024-05-01 16:00:00", 'Y-m-d H:i');
```

### 数字格式化

[](#数字格式化)

#### 去除浮点数末尾0

[](#去除浮点数末尾0)

```
echo \Yii\Helpers\floatRtrimZero('1.30000'); // 1.3
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Total

2

Last Release

750d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/yii-tool-helpers/health.svg)

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

###  Alternatives

[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

318123.0k1](/packages/cognesy-instructor-php)[crwlr/crawler

Web crawling and scraping library.

36917.4k2](/packages/crwlr-crawler)[lingaro/magento2-codegen

Magento 2 Code Generator

966.5k](/packages/lingaro-magento2-codegen)[jeffreyvanrossum/wp-settings

Handy wrapper to make creating WordPress settings pages a breeze.

902.8k1](/packages/jeffreyvanrossum-wp-settings)[dotink/jin

Jsonified Ini Notation

1410.6k3](/packages/dotink-jin)

PHPackages © 2026

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