PHPackages                             zidizei/toml-php - 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. zidizei/toml-php

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

zidizei/toml-php
================

Parsing TOML with PHP.

0.3.0(12y ago)31191MITPHPPHP &gt;=5.3.0

Since Apr 2Pushed 11y ago1 watchersCompare

[ Source](https://github.com/zidizei/toml-php)[ Packagist](https://packagist.org/packages/zidizei/toml-php)[ Docs](http://github.com/zidizei/toml-php)[ RSS](/packages/zidizei-toml-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (3)Used By (0)

TOML for PHP
============

[](#toml-for-php)

Parsing [TOML](https://github.com/mojombo/toml) with PHP. Supports TOML Specs [0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md).

[![Build Status](https://camo.githubusercontent.com/7002b51b87599e741b9d9020cd0f9a6e7b653c362e4dbeb53ee6881411ebb75a/68747470733a2f2f7472617669732d63692e6f72672f7a6964697a65692f746f6d6c2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zidizei/toml-php)

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

[](#installation)

Use [Composer](http://getcomposer.org) and add this to your `composer.json`:

```
"require": {
    "zidizei/toml-php", "~0.3.0"
}

```

If you want you can just download/clone the source code from GitHub as well. Just include the `src/Toml/Toml.php` file in your application and you should be good to go.

Usage
-----

[](#usage)

The following will parse a TOML formatted String:

```
$array = \Toml\parse('title = "TOML Example"');

```

To parse a TOML file, you can just use the same helper function:

```
$array = \Toml\parse('tests/example.toml');

```

Tests
-----

[](#tests)

Tests are done using [PHPUnit](http://phpunit.de/) and [Composer](http://getcomposer.org)'s autoloader (`vendor/autoload.php` is bootstrapped by *phpunit* to include the TOML parser class to be tested):

```
composer install
phpunit

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~25 days

Total

2

Last Release

4491d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/470408?v=4)[Patrick Lam](/maintainers/zidizei)[@zidizei](https://github.com/zidizei)

---

Top Contributors

[![zidizei](https://avatars.githubusercontent.com/u/470408?v=4)](https://github.com/zidizei "zidizei (20 commits)")[![laurent22](https://avatars.githubusercontent.com/u/1285584?v=4)](https://github.com/laurent22 "laurent22 (2 commits)")

---

Tags

toml

### Embed Badge

![Health badge](/badges/zidizei-toml-php/health.svg)

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

###  Alternatives

[yosymfony/toml

A PHP parser for TOML compatible with specification 0.4.0

2101.8M92](/packages/yosymfony-toml)[m1/vars

Vars is a simple to use and easily extendable configuration loader with in built loaders for ini, json, PHP, toml, XML and yaml/yml file types. It also comes with in built support for Silex and more frameworks to come soon.

69124.3k1](/packages/m1-vars)[devium/toml

A PHP encoder/decoder for TOML compatible with 1.0.0 and 1.1.0

4087.5k28](/packages/devium-toml)[jamesmoss/toml

A parser for TOML implemented in PHP.

3131.8k15](/packages/jamesmoss-toml)[yosymfony/config-loader

Configuration file loader

10112.5k3](/packages/yosymfony-config-loader)[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.

9845.4k](/packages/sauladam-shipment-tracker)

PHPackages © 2026

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