PHPackages                             fastd/config - 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. fastd/config

ActiveLibrary

fastd/config
============

config container

v3.2.2(8y ago)420.0k37MITPHPPHP &gt;=5.6

Since Jun 21Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/fastdlabs/config)[ Packagist](https://packagist.org/packages/fastd/config)[ RSS](/packages/fastd-config/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (9)Dependencies (3)Versions (31)Used By (7)

Config
======

[](#config)

[![Build Status](https://camo.githubusercontent.com/5e2f6210e29d48a58258884ff7237b581d899cf9cf5a3fa71063340693d44464/68747470733a2f2f7472617669732d63692e6f72672f66617374646c6162732f636f6e6669672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fastdlabs/config)[![Latest Stable Version](https://camo.githubusercontent.com/9f76e37dce00e93963b18443754b7820bf001b1708b7aabb9f57ee6055d714ff/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e6669672f762f737461626c65)](https://packagist.org/packages/fastd/config)[![Total Downloads](https://camo.githubusercontent.com/94c89b016793ae156d22369a7913cceac56783125f33f3c6751d8269c05c45e9/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e6669672f646f776e6c6f616473)](https://packagist.org/packages/fastd/config)[![Latest Unstable Version](https://camo.githubusercontent.com/6a7a498066fc39aaf5f1970218f278b3c2802e3b6f4e78f341d6315639692dee/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e6669672f762f756e737461626c65)](https://packagist.org/packages/fastd/config)[![License](https://camo.githubusercontent.com/51c0f46325932c39a0b415d7c6189856ce2574b8e5f996bd9444b05efdb0fbd0/68747470733a2f2f706f7365722e707567782e6f72672f66617374642f636f6e6669672f6c6963656e7365)](https://packagist.org/packages/fastd/config)

简单的 PHP 配置解析器，依赖实现于: [Utils](https://github.com/fastdlabs/utils)

Requirements
------------

[](#requirements)

- PHP &gt;= 5.6

Composer
--------

[](#composer)

```
composer require fastd/config

```

Usage
-----

[](#usage)

```
use FastD\Config\Config;

$config = new Config(array $config, array $variables = []);

$config->load($file);

$config->find($key, $default);
```

变量使用 `%` 来标记. 如: `%name%`

Testing
-------

[](#testing)

```
phpunit

```

### Support

[](#support)

如果你在使用中遇到问题，请联系: . 微博: [编码侠](http://weibo.com/ecbboyjan)

### 贡献

[](#贡献)

非常欢迎感兴趣，愿意参与其中，共同打造更好PHP生态，Swoole生态的开发者。

如果你乐于此，却又不知如何开始，可以试试下面这些事情：

- 在你的系统中使用，将遇到的问题 [反馈](https://github.com/JanHuang/fastD/issues)。
- 有更好的建议？欢迎联系  或 [新浪微博:编码侠](http://weibo.com/ecbboyjan)。

### 联系

[](#联系)

如果你在使用中遇到问题，请联系: . 微博: [编码侠](http://weibo.com/ecbboyjan)

License MIT
-----------

[](#license-mit)

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance52

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 99% 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 ~35 days

Recently: every ~65 days

Total

28

Last Release

3037d ago

Major Versions

v0.2.3 → v1.0.02015-09-07

v1.0.1 → v2.0.0-beta12016-04-30

v2.0.0-beta4 → v3.0.0-beta12016-09-15

PHP version history (3 changes)v0.1.0PHP &gt;=5.4

v2.0.0-beta1PHP &gt;=7.0

v3.0.0-beta1PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/94c2bc821caf23977e1c3deea85e3cbc9a73a632e1afaf778638f7fe9da1c42b?d=identicon)[JanHuang](/maintainers/JanHuang)

---

Top Contributors

[![JanHuang](https://avatars.githubusercontent.com/u/7090871?v=4)](https://github.com/JanHuang "JanHuang (96 commits)")[![RunnerLee](https://avatars.githubusercontent.com/u/7436388?v=4)](https://github.com/RunnerLee "RunnerLee (1 commits)")

---

Tags

configphpconfigFastD

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[pragmarx/yaml

Load your Laravel config files using yaml

1152.8M29](/packages/pragmarx-yaml)[opensky/runtime-config-bundle

This bundle provides a way to inject parameters into services at runtime by exposing a RuntimeParameterBag service, which functions exactly like Symfony2's own ParameterBags.

10949.5k1](/packages/opensky-runtime-config-bundle)[caseyamcl/configula

A simple, but versatile, PHP config loader

42146.6k6](/packages/caseyamcl-configula)[corneltek/configkit

Fast config toolkit, which provides super lightweight config accessor and loader.

1314.1k8](/packages/corneltek-configkit)

PHPackages © 2026

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