As Jesse Donat mentioned the type will be infered automatically. To enforce some type you can use the callback facility like this:
return newDateTime($value);
}$yaml= <<
name: My Event
date: !date 25.05.2001YAML;$ndocs=0;$data=yaml_parse($yaml,0,$ndocs, array('!date'=>'cb_yaml_date'));print_r($data);?>
The above example will output something similar to:
Array
(
[event1] => Array
(
[name] => My Event
[date] => DateTime Object
(
[date] => 2001-05-25 00:00:00
[timezone_type] => 3
[timezone] => Europe/Berlin
)
)
)
BTW if you want to have large numbers you are probably using BC Math. Thus, you simple enclose your number in quotes:
$yaml= <<