'fixed' => 1230.15,
)
---
-test: Miscellaneous
-spec: 2.21
-yaml: |
- null: ~
- true: true
- false: false
- string: '12345'
-php: |
- array(
- '' => null,
- 1 => true,
- 0 => false,
- 'string' => '12345'
- )
----
test: Timestamps
todo: true
spec: 2.22
todo: true
spec: 2.23
yaml: |
- not-date: !str 2002-04-28
+ not-date: !!str 2002-04-28
picture: !binary |
R0lGODlhDAAMAIQAAP//9/X
17unp5WZmZgAAAOfn515eXv
---
test: Explicit typing
+deprecated: Using the non-specific tag "!" is deprecated since Symfony 3.4 as its behavior will change in 4.0.
yaml: |
integer: 12
also int: ! "12"
- string: !str 12
+ string: !!str 12
php: |
array( 'integer' => 12, 'also int' => 12, 'string' => '12' )
---
test: Type family under yaml.org
yaml: |
# The URI is 'tag:yaml.org,2002:str'
- - !str a Unicode string
+ - !!str a Unicode string
php: |
array( 'a Unicode string' )
---
second: 12 ## This is an integer.
- third: !str 12 ## This is a string.
+ third: !!str 12 ## This is a string.
span: this contains
six spaces
# The following scalars
# are loaded to the
# string value '1' '2'.
- - !str 12
+ - !!str 12
- '12'
- "12"
- "\
}
---
-test: Boolean
-yaml: |
- false: used as key
- logical: true
- answer: false
-php: |
- array(
- false => 'used as key',
- 'logical' => true,
- 'answer' => false
- )
----
test: Integer
yaml: |
canonical: 12345