1. Go to this page and download the library: Download evilfreelancer/yaml-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
evilfreelancer / yaml-php example snippets
EvilFreelancer\Yaml\Yaml;
// Object for work with YAML
$yaml = new Yaml();
// Simple array from which need build YAML
$array = [
'string' => 'zzz',
'integer' => 42,
'bool' => true,
];
// Generate YAML and print to stdOut
$yaml_text = $yaml->set($array)->show();
echo $yaml_text;