Yaml
class Yaml
Yaml offers convenience methods to load and dump YAML.
Constants
Methods
static mixed
parseFile(string$filename,int$flags =0)
Parses a YAML file into a PHP value.
static mixed
parse(string$input,int$flags =0)
Parses YAML into a PHP value.
static string
dump(mixed$input,int$inline =2,int$indent =4,int$flags =0)
Dumps a PHP value to a YAML string.
Details
staticmixed
parseFile(string$filename,int$flags =0)
Parses a YAML file into a PHP value.
Usage:
$array = Yaml::parseFile('config.yml');
print_r($array);