File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ You can dump objects by using the ``DUMP_OBJECT`` flag::
250
250
$object->foo = 'bar';
251
251
252
252
$dumped = Yaml::dump($object, 2, 4, Yaml::DUMP_OBJECT);
253
- // !php/object O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}
253
+ // !php/object ' O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}'
254
254
255
255
And parse them by using the ``PARSE_OBJECT `` flag::
256
256
@@ -276,7 +276,7 @@ By default the parser will encode invalid types as ``null``. You can make the
276
276
parser throw exceptions by using the ``PARSE_EXCEPTION_ON_INVALID_TYPE ``
277
277
flag::
278
278
279
- $yaml = '!php/object O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}';
279
+ $yaml = '!php/object \' O:8:"stdClass":1:{s:5:"foo";s:7:"bar";}\' ';
280
280
Yaml::parse($yaml, Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); // throws an exception
281
281
282
282
Similarly you can use ``DUMP_EXCEPTION_ON_INVALID_TYPE `` when dumping::
You can’t perform that action at this time.
0 commit comments