PHPackages                             nimayneb/advini - 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. nimayneb/advini

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

nimayneb/advini
===============

Advanced INI reader

2.0.1(8y ago)0248[1 PRs](https://github.com/nimayneb/advini/pulls)BSD-3-ClausePHPPHP ~7.1.0CI failing

Since Jan 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nimayneb/advini)[ Packagist](https://packagist.org/packages/nimayneb/advini)[ Docs](https://github.com/nimayneb/advini)[ RSS](/packages/nimayneb-advini/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (1)Versions (27)Used By (0)

PHP Advini
==========

[](#php-advini)

Advanced INI file reader for PHP.

Problem:

You cannot define and read deeper array structures with internal "parse\_ini\_file" implementation:

```
[group1]
property1 = value1
property2 = value2
property3 = value3

[group2]
property1 = value1
property2 = value2
property3 = value3
```

"Advini" extends the internal "parse\_ini\_file" with several ingredients.

It supports:

- defining complex keys and sections

    ```
     category/property = value
    ```
- importing any INI file

    ```
     property = @import[ default.ini ]
    ```
- including constants (from INI file)

    ```
     property = >
    ```
- calling methods before setting

    ```
     property:sha1 = geheim1234
    ```

Defining complex keys and sections
----------------------------------

[](#defining-complex-keys-and-sections)

Usage:

```
[{key1}/{key2}(...)]
key3/key4(...) = value
```

PHP:

```
use JBR\Advini\Advini;

$ini = new Advini();

$configuration = $ini->getFromFile("local.ini");
var_dump($configuration);
```

INI:

```
[category/subcategory]
key = value
```

Resulted output:

```
array(
    "category" => array(
        "subcategory" => array(
            "key" => "value"
        )
    )
)

```

Importing any INI file
----------------------

[](#importing-any-ini-file)

Usage:

```
{key} = @import[ [file] ]
```

PHP:

```
use JBR\Advini\Advini;

$ini = new Advini();
$configuration = $ini->getFromFile("local.ini");
var_dump($configuration);
```

INI "local.ini":

```
category = @import[ import.ini ]
```

INI "import.ini":

```
[subcategory]
key = value
```

Resulted output:

```
array(
    "category" => array(
        "subcategory" => array(
            "key" => "value"
        )
    )
)

```

Including constants
-------------------

[](#including-constants)

Usage:

```
{key} = >
```

PHP:

```
use JBR\Advini\Advini;
use JBR\Advini\Instructor\ConstantInstructor;

$ini = new Advini();
$const = $ini->getInstructor(ConstantInstructor::class);
$const->setConstantsFromFile("constants.ini");
$configuration = $ini->getFromFile("local.ini");
var_dump($configuration);
```

INI "constants.ini":

```
[category/subcategory]
key = value
```

INI "local.ini":

```
[category/subcategory]
key = >
```

Resulted output:

```
array(
    "category" => array(
        "subcategory" => array(
            "key" => "value"
        )
    )
)

```

Calling methods before setting
------------------------------

[](#calling-methods-before-setting)

Usage:

```
{key}:{method}(...) = {value}
```

PHP:

```
use JBR\Advini\Advini;
use JBR\Advini\Methods\Base;

$ini = new Advini(new Base());

try {
    $configuration = $ini->getFromFile("local.ini");
    var_dump($configuration);
} catch (AdviniException $e) {
    echo $e->getMessage();
}
```

INI "local.ini":

```
[category/subcategory]
key1:integer = "foobar"
key2:string = 123
key3:md5 = "secret"
```

Resulted output:

```
array(
    "category" => array(
        "subcategory" => array(
            "key1" => 0,
            "key2" => "123",
            "key3" => "5ebe2294ecd0e0f08eab7690d2a6ee69"
        )
    )
)

```

Or calling by sections:

Usage:

```
[{section}:{method}]
{key} = {value}
```

INI "local.ini":

```
[category/subcategory:serialize]
key1:integer = "foobar"
key2:string = 123
key3:md5 = "secret"
```

Resulted output:

```
array(
    "category" => array(
        "subcategory" => "a:3:{s:4:"key1";i:0;s:4:"key2";s:3:"123";s:4:"key3";s:32:"5ebe2294ecd0e0f08eab7690d2a6ee69";}"
    )
)

```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 91.7% 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 ~31 days

Recently: every ~50 days

Total

20

Last Release

3221d ago

Major Versions

1.6.0 → 2.0.02017-08-31

PHP version history (2 changes)1.3.0PHP &gt;5.4.10

2.0.0PHP ~7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fbcb5c834ad511bbf12b303f38026f1c00466d4e2fe1e96f5bcfbae83779ac9?d=identicon)[nimayneb](/maintainers/nimayneb)

---

Top Contributors

[![nimayneb](https://avatars.githubusercontent.com/u/9550921?v=4)](https://github.com/nimayneb "nimayneb (11 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

configurationSettingsarrayreaderextractadvancedmultiexpandinitialize

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nimayneb-advini/health.svg)

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

###  Alternatives

[league/config

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

565323.7M35](/packages/league-config)[chillerlan/php-settings-container

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

3432.2M22](/packages/chillerlan-php-settings-container)[dmishh/settings-bundle

Database centric Symfony configuration management. Global and per-user settings supported.

114256.9k1](/packages/dmishh-settings-bundle)[jbtronics/settings-bundle

A symfony bundle to easily create typesafe, user-configurable settings for symfony applications

9558.8k3](/packages/jbtronics-settings-bundle)[flow-php/array-dot

PHP ETL - Array Dot functions

14468.2k5](/packages/flow-php-array-dot)[selective/config

Config component, strictly typed

16191.9k3](/packages/selective-config)

PHPackages © 2026

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