D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
share
/
doc
/
cpanel-php73-horde-yaml
/
examples
/
Filename :
dump.php
back
Copy
<?php /** * @package Yaml */ require_once dirname(dirname(__DIR__)) . '/Yaml/__autoload.php'; $array[] = 'Sequence item'; $array['The Key'] = 'Mapped value'; $array[] = array('A sequence','of a sequence'); $array[] = array('first' => 'A sequence','second' => 'of mapped values'); $array['Mapped'] = array('A sequence','which is mapped'); $array['A Note'] = 'What if your text is too long?'; $array['Another Note'] = 'If that is the case, the dumper will probably fold your text by using a block. Kinda like this.'; $array['The trick?'] = 'The trick is that we overrode the default indent, 2, to 4 and the default wordwrap, 40, to 60.'; $array['Old Dog'] = "And if you want\n to preserve line breaks, \ngo ahead!"; echo "A PHP array run through Horde_Yaml::dump():\n"; var_dump(Horde_Yaml::dump($array, 4, 60));