PHPackages                             flatphp/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. flatphp/config

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

flatphp/config
==============

light config component

v1.0.0(9y ago)116MITPHPPHP &gt;=5.5

Since May 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/flatphp/config)[ Packagist](https://packagist.org/packages/flatphp/config)[ RSS](/packages/flatphp-config/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Config
======

[](#config)

light config component

Install
=======

[](#install)

```
composer require "flatphp/config"
```

Usage
=====

[](#usage)

```
use Flatphp\Config\BaseArray as Config
Config::set(array(
    'db' => array(
	'host' => 'localhost',
	'port' => '3306',
	'username' => 'test',
	'password' => '123456',
	'dbname' => 'test'
    ),

    'redis' => array(
	'host' => 'localhost',
	'port' => '6379'
    )
));

$db_config = Config::get('db');
```

OR
--

[](#or)

```
use Flatphp\Config\BaseArray as Config
Config::set('key', 'value');
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3328d ago

### Community

Maintainers

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

---

Top Contributors

[![shukyoo](https://avatars.githubusercontent.com/u/2231396?v=4)](https://github.com/shukyoo "shukyoo (1 commits)")

---

Tags

config

### Embed Badge

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

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

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

3.2k514.6M1.9k](/packages/symfony-options-resolver)[league/config

Define configuration arrays with strict schemas and access values with dot notation

565323.7M35](/packages/league-config)[dflydev/dot-access-configuration

Given a deep data structure representing a configuration, access configuration by dot notation.

13414.5M4](/packages/dflydev-dot-access-configuration)[akaunting/laravel-setting

Persistent settings package for Laravel

493883.0k7](/packages/akaunting-laravel-setting)[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.8M23](/packages/m1-env)[pheme/yii2-settings

Yii2 Database settings

152766.8k7](/packages/pheme-yii2-settings)

PHPackages © 2026

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