PHPackages                             sigjlr/phpconfig - 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. sigjlr/phpconfig

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

sigjlr/phpconfig
================

Load INI configuration files

0.1.0(12y ago)119MITPHPPHP &gt;=5.3.0

Since Sep 25Pushed 12y ago1 watchersCompare

[ Source](https://github.com/sigjlr/phpConfig)[ Packagist](https://packagist.org/packages/sigjlr/phpconfig)[ Docs](https://github.com/sigjlr/phpConfig)[ RSS](/packages/sigjlr-phpconfig/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

phpConfig
=========

[](#phpconfig)

A simple reader of .ini configuration files.

\##Install You may install the phpConfig with [Composer](http://getcomposer.org/) (recommended) or manually.

\##Usage This example assumes you are autoloading dependencies using Composer or any other [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) compliant autoloader.

```
//Create a new PhpConfig
$config = new \PhpConfig\PhpConfig();

//Add any ini resources
$config->addResource('config.ini');
//You can add many resource in a single line
$config->addResource('config.ini', 'config2.ini' );

//Load the resources and produce the configuration array
//If the same key is present in many resources, the last one will be preserved.
$config->load();

//Get the configuration array
$myConfiguration = $config->getConfig();
```

To deny browser access to the .ini files add this directive in .htaccess

```

    Order deny,allow
    Deny from all

```

By example consider this ini files:

Global.ini:

```
[Section_A]
param1 = GlobalA1
param2 = GlobalA2
```

Local.ini:

```
[Section_A]
param1 = LocalA1
param3 = LocalA3

[Section_B]
param1 = LocalB1
param2 = LocalB2
```

With this code:

```
//Create a new PhpConfig
$config = new \PhpConfig\PhpConfig();

//Add resources
$config->addResource('Global.ini', 'Local.ini' );

$config->load();
$myConfiguration = $config->getConfig();

print_r($myConfiguration);
/*
you get this array:

Array(
  [Section_A]=>array(
    [param1] => LocalA1,
    [param2]=> globalA2,
    [param3]=> LocalA3
   ),
   [Section_B]=>array(
    [param1] => LocalB1,
    [param2]=> LocalA2
   )
)
*/
```

\##License The phpConfig is released under the MIT public license

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

4615d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/211db8e9c4ca1b9697fc1ca8b50631aa3ff203254c9be658dd7edb6d26ddaae3?d=identicon)[sigjlr](/maintainers/sigjlr)

---

Top Contributors

[![sigjlr](https://avatars.githubusercontent.com/u/5195951?v=4)](https://github.com/sigjlr "sigjlr (11 commits)")

---

Tags

configurationini

### Embed Badge

![Health badge](/badges/sigjlr-phpconfig/health.svg)

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

###  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)[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)[clagiordano/weblibs-configmanager

weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object

163.5M9](/packages/clagiordano-weblibs-configmanager)

PHPackages © 2026

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