Parsing TOML with PHP.

Installs: 14

Dependents: 0

Suggesters: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

0.3.0 2014-04-27 18:07 UTC


Parsing TOML with PHP. Supports TOML Specs 0.2.0.

Build Status


Use Composer 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.


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 are done using PHPUnit and Composer's autoloader (vendor/autoload.php is bootstrapped by phpunit to include the TOML parser class to be tested):

composer install