phacman / php-yaml
Compact version: Loads and dumps YAML files
v1.0.0
2023-10-29 05:50 UTC
Requires
- php: >=8.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3
- phpunit/phpunit: ^9.5
README
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
- Original repository: https://github.com/symfony/yaml