a SENSIOLABS Product
Symfony

YAML
A PHP library that speaks YAML

Symfony YAML is a PHP library that parses YAML strings and converts them to PHP arrays. It can also converts PHP arrays to YAML strings.

YAML, YAML Ain't Markup Language, is a human friendly data serialization standard for all programming languages. YAML is a great format for your configuration files. YAML files are as expressive as XML files and as readable as INI files.

Easy to use

There is only one archive to download, and you are ready to go. No configuration, No installation. Drop the files in a directory and start using it today in your projects.

Open-Source

Released under the MIT license, you are free to do whatever you want, even in a commercial environment. You are also encouraged to contribute.

Used by popular Projects

Symfony YAML was initially released as part of the symfony framework, one of the most popular PHP web framework. It is also embedded in other popular projects like PHPUnit or Doctrine.

Documented

Symfony YAML is fully documented, with a dedicated online book, and of course a full API documentation.

Fast

One of the goal of Symfony YAML is to find the right balance between speed and features. It supports just the needed feature to handle configuration files.

Unit tested

The library is fully unit-tested. With more than 400 unit tests, the library is stable and is already used in large projects.

Real Parser

It sports a real parser and is able to parse a large subset of the YAML specification, for all your configuration needs. It also means that the parser is pretty robust, easy to understand, and simple enough to extend.

Clear error messages

Whenever you have a syntax problem with your YAML files, the library outputs a helpful message with the filename and the line number where the problem occurred. It eases the debugging a lot.

Dump support

It is also able to dump PHP arrays to YAML with object support, and inline level configuration for pretty outputs.

Types Support

Supports most of the YAML built-in types like dates, integers, octals, booleans, and much more...

Full merge key support

Full support for references, aliases, and full merge key. Don't repeat yourself by referencing common configuration bits.

PHP Embedding

YAML files are dynamic. By embedding PHP code inside a YAML file, you have even more power for your configuration files.

Who is behind Symfony YAML?

The Symfony YAML library is being developed and maintained by the symfony project team. It has been extracted from symfony to be used as a standalone library. Symfony YAML is part of the symfony components project.

powered by symfony - "symfony" is a trademark of Fabien Potencier, all rights reserved - The components "animals" are © 2009 Sensio Labs

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.