Skip to content
This repository was archived by the owner on Jun 26, 2018. It is now read-only.

zidizei/toml-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TOML for PHP

Parsing TOML with PHP. Supports TOML Specs 0.2.0.

Build Status

Installation

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.

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 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
phpunit

About

Parse TOML with PHP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages