diff --git a/components/yaml.rst b/components/yaml.rst index ec47ea6a9ee..ab237f371f3 100644 --- a/components/yaml.rst +++ b/components/yaml.rst @@ -379,6 +379,17 @@ objects, they are automatically transformed into YAML tags:: $dumped = Yaml::dump($data); // $dumped = '!my_tag { foo: bar }' +Dumping null +~~~~~~~~~~~~~ + +By default, the dumper will represent ``null`` values with ``null``:: + + Yaml::dump(array('foo' => null)); // foo: null + +You can make it represent them with ``~`` by using the ``DUMP_NULL_AS_TILDE`` flag:: + + Yaml::dump(array('foo' => null), 2, 4, Yaml::DUMP_NULL_AS_TILDE); // foo: ~ + Syntax Validation ~~~~~~~~~~~~~~~~~ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy