PHPackages                             4d47/ani - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. 4d47/ani

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

4d47/ani
========

Almost INI, parser/emitter inspired by ArchieML and PHP array

1102[2 issues](https://github.com/4d47/php-ani/issues)PHP

Since Dec 12Pushed 7y ago2 watchersCompare

[ Source](https://github.com/4d47/php-ani)[ Packagist](https://packagist.org/packages/4d47/ani)[ RSS](/packages/4d47-ani/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Ani is almost INI
=================

[](#ani-is-almost-ini)

This is an exploration of a format for structured text that is:

- Easy for authoring
- Easy to embed other formats
- s ≈ emit(parse(s))

Differences from INI:

- No parsing errors
- Has multiline value
- Has lists
- Use colon instead of equal

**Context** Built out from a port of ArchieML. Wanted to replace a bunch of YAML files with a simpler syntax that did not change formatting on serialization.

Usage
-----

[](#usage)

```
$result = Ani\parse("key: value");
$string = Ani\emit($result);
```

Format
------

[](#format)

```
» key: value
« [ 'key' => 'value' ]

```

Duplicate keys creates a list of objects:

```
» name: frank
  age: 52
  name: vincent
  age: 64
« [
    [
      'name' => 'frank',
      'age' => 52
    ],
    [
      'name' => 'vincent',
      'age' => 62
    ]
  ]

```

Text lines are *not* ignored:

```
» key: value
  Jane is this working ?
« [
    'key' => 'value',
    'Jane is this working ?'
  ]

```

A text line that looks like a key can be escaped with backslash:

```
» \key: value
« [ 'key: value' ]

```

So simple "flat array" is easy:

```
» milk
  cereals
« [ 'milk', 'cereals' ]

```

And sections:

```
» [groceries]
  milk
  cereals
« [ 'groceries' => [ 'milk', 'cereals' ] ]

```

Section plural (controversial) determine the initial list type:

```
» [groceries]
  name: milk
« [ 'groceries' => [ [ 'name' => 'milk' ] ] ]

» [grocery]
  name: milk
« [ 'grocery' => [ 'name' => 'milk' ] ]

```

Multiline is started by writing a newline and indenting value!

```
» title: Funky
  content:
    Something along
      the lines
« [ 'title' => 'Funky', 'content' => 'Something along\n  the lines' ]

```

Almost equal to
---------------

[](#almost-equal-to)

- spaces before key is lost
- surrounding spaces in section names is lost
- multiline indentation is always two-spaces

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1c1f7f19402246b0c27cb6428889b9d44a9f11018d3d2dc8734cfd8757af7dd3?d=identicon)[4d47](/maintainers/4d47)

---

Top Contributors

[![4d47](https://avatars.githubusercontent.com/u/729919?v=4)](https://github.com/4d47 "4d47 (35 commits)")

### Embed Badge

![Health badge](/badges/4d47-ani/health.svg)

```
[![Health](https://phpackages.com/badges/4d47-ani/health.svg)](https://phpackages.com/packages/4d47-ani)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19037.7M41](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9642.0k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

46143.1k6](/packages/jstewmc-rtf)[moonshine/layouts-field

Field for repeating groups of fields for MoonShine

107.9k](/packages/moonshine-layouts-field)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

112.9k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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