phacman / php-yaml

Compact version of "symfony/yaml"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yaml Compact Version

The Yaml loads and dumps YAML files.

History with a list of original committers/commits: shortlog.txt

Getting Started

Read file

use PhacMan\Yaml\Yaml;
$yaml = Yaml::parseFile('some.yaml');
print_r($yaml);

Write file

use PhacMan\Yaml\Yaml;
$array = [
    'foo' => 'bar',
    'bar' => ['foo' => 'bar', 'bar' => 'baz'],
];
$yaml = Yaml::dump($array);
file_put_contents('written.yaml', $yaml);

Usage details: here

Resources

About

Compact version of "symfony/yaml"

License:MIT License


Languages

Language:PHP 100.0%