1---
2test: Simple Inline Array
3brief: >
4    Sequences can be contained on a
5    single line, using the inline syntax.
6    Separate each entry with commas and
7    enclose in square brackets.
8yaml: |
9    seq: [ a, b, c ]
10php: |
11    ['seq' => ['a', 'b', 'c']]
12---
13test: Simple Inline Hash
14brief: >
15    Mapping can also be contained on
16    a single line, using the inline
17    syntax.  Each key-value pair is
18    separated by a colon, with a comma
19    between each entry in the mapping.
20    Enclose with curly braces.
21yaml: |
22    hash: { name: Steve, foo: bar }
23php: |
24    ['hash' => ['name' => 'Steve', 'foo' => 'bar']]
25---
26test: Multi-line Inline Collections
27todo: true
28brief: >
29    Both inline sequences and inline mappings
30    can span multiple lines, provided that you
31    indent the additional lines.
32yaml: |
33    languages: [ Ruby,
34                 Perl,
35                 Python ]
36    websites: { YAML: yaml.org,
37                Ruby: ruby-lang.org,
38                Python: python.org,
39                Perl: use.perl.org }
40php: |
41    [
42      'languages' => ['Ruby', 'Perl', 'Python'],
43      'websites' => [
44        'YAML' => 'yaml.org',
45        'Ruby' => 'ruby-lang.org',
46        'Python' => 'python.org',
47        'Perl' => 'use.perl.org'
48      ]
49    ]
50---
51test: Commas in Values (not in the spec!)
52todo: true
53brief: >
54    List items in collections are delimited by commas, but
55    there must be a space after each comma.  This allows you
56    to add numbers without quoting.
57yaml: |
58    attendances: [ 45,123, 70,000, 17,222 ]
59php: |
60    ['attendances' => [45123, 70000, 17222]]
61