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

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

yaxin/php-config
================

PHP config reader

1.1.0(6y ago)05MITPHPPHP ^7.2CI failing

Since Jun 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/yaxin-cn/php-config)[ Packagist](https://packagist.org/packages/yaxin/php-config)[ Docs](https://github.com/yaxin-cn/php-config)[ RSS](/packages/yaxin-php-config/feed)WikiDiscussions master Synced today

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

php-config
==========

[](#php-config)

`php-config` is a config file reader, that can read yaml json and php format config file.

Installation
------------

[](#installation)

`php-config` is available via composer. Just add the following code to your `composer.json` file under **required** section and execute command `composer update` or you can run directly:

```
composer require yaxin/php-config
```

Usage
-----

[](#usage)

Examples
--------

[](#examples)

```
config directory structure

.
├── app.yaml
├── abc.php
├── bcd.yml
├── cde.json
├── info.php
├── regions
│   └── beijing.yml
├── production
|   └── database.yml
├── testing
|   └── database.yml
└── development
    └── database.yml

```

```
use Yaxin\PHPConfig\PHPConfig;

$config = new PHPConfig('/path/to/config/path', '/path/to/compile_cache/path', 'production');
$config->get('app.name');
// output is: php-config

$config->get('regions.beijing.name');
// output is: beijing

$config->get('database.default.host');
// output is: 1.2.3.4

$config->get('none.exist.key');
// output is: null

$config->get('none.exist.key', 'php-config');
// output is: php-config
```

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

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

Total

2

Last Release

2197d ago

### Community

Maintainers

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49617.1k](/packages/blackfire-player)[altis/local-server

Local Server module for Altis

18221.6k3](/packages/altis-local-server)

PHPackages © 2026

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