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

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

phlib/config
============

Config functions

3.0.0(1y ago)116.0k↓50%1LGPL-3.0PHPPHP ^8.1

Since Feb 22Pushed 1y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (2)Versions (10)Used By (1)

phlib/config
============

[](#phlibconfig)

[![Code Checks](https://camo.githubusercontent.com/6797f1e6adc248d6f87618e4bd43106ea83aead2a4b4b0a186d53817c8a57a56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70686c69622f636f6e6669672f636f64652d636865636b732e796d6c3f6c6f676f3d676974687562)](https://github.com/phlib/config/actions/workflows/code-checks.yml)[![Codecov](https://camo.githubusercontent.com/81fb954ca918f432d56ac73b24613507cc6ef35bb996c7f7e8bd02b6b9d957a7/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f70686c69622f636f6e6669672e7376673f6c6f676f3d636f6465636f76)](https://codecov.io/gh/phlib/config)[![Latest Stable Version](https://camo.githubusercontent.com/04c797c4b04e2ab0e992064fb7fa0edc4c65409aa3b264401d8fb5fe0286a6cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70686c69622f636f6e6669672e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/config)[![Total Downloads](https://camo.githubusercontent.com/f0e8d759bfff961a43e0057c236ca37a34329adc08918ce5640a5de2f42830b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70686c69622f636f6e6669672e7376673f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/phlib/config)[![Licence](https://camo.githubusercontent.com/097dd4826f40eb2bd318fa21d1d12e22d17ae27368959969c05ddb01fe71e444/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f636f6e6669672e737667)](https://camo.githubusercontent.com/097dd4826f40eb2bd318fa21d1d12e22d17ae27368959969c05ddb01fe71e444/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70686c69622f636f6e6669672e737667)

```
$config = [
    'db' => [
        'host' => '10.1.0.1',
        'username' => 'sam',
        'password' => 'SuperSafePass',
    ],
];

$host = \Phlib\Config\get($config, 'db.host');
$port = \Phlib\Config\get($config, 'db.port', 3306);
```

License
-------

[](#license)

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see .

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance42

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 85% 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 ~453 days

Recently: every ~716 days

Total

9

Last Release

476d ago

Major Versions

1.0.0 → 2.0.02017-03-07

1.0.1 → 2.0.22017-03-24

2.0.4 → 3.0.02025-01-27

PHP version history (5 changes)1.0.0PHP ~5.4

2.0.0PHP ^7

1.0.x-devPHP ^5.4|^7.0

2.0.4PHP ^7|^8

3.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/135b7ddf9ec91c412e1b18174f81d1ad2bef66e732624195c156717c96b13731?d=identicon)[letssurf](/maintainers/letssurf)

![](https://www.gravatar.com/avatar/10c53cdcfb3a6d299820aecb993521cc1a972baa09fd8f31d2468908cded7e1d?d=identicon)[chrisminett](/maintainers/chrisminett)

---

Top Contributors

[![chrisminett](https://avatars.githubusercontent.com/u/1084019?v=4)](https://github.com/chrisminett "chrisminett (34 commits)")[![jdempster](https://avatars.githubusercontent.com/u/10297?v=4)](https://github.com/jdempster "jdempster (5 commits)")[![awhale](https://avatars.githubusercontent.com/u/6044970?v=4)](https://github.com/awhale "awhale (1 commits)")

---

Tags

configuration

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

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

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

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

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

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

564302.2M24](/packages/league-config)[josegonzalez/dotenv

dotenv file parsing for PHP

2799.8M137](/packages/josegonzalez-dotenv)[dflydev/dot-access-configuration

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

13414.5M4](/packages/dflydev-dot-access-configuration)[symfony/requirements-checker

Check Symfony requirements and give recommendations

2014.7M29](/packages/symfony-requirements-checker)[chillerlan/php-settings-container

A container class for immutable settings objects. Not a DI container.

3427.3M21](/packages/chillerlan-php-settings-container)

PHPackages © 2026

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