Yaml
Yaml
class Yaml
Yaml offers convenience methods to load and dump YAML.
Methods
static mixed | parse(string $input, bool $exceptionOnInvalidType = false, bool $objectSupport = false, bool $objectForMap = false) Parses YAML into a PHP value. | |
static string | dump(mixed $input, int $inline = 2, int $indent = 4, bool $exceptionOnInvalidType = false, bool $objectSupport = false) Dumps a PHP value to a YAML string. |
Details
static mixed parse(string $input, bool $exceptionOnInvalidType = false, bool $objectSupport = false, bool $objectForMap = false)
Parses YAML into a PHP value.
Usage:
$array = Yaml::parse(fil