Veja Também

User Contributed Notes 8 notes

A warning to others. Some keys will return with a default value where others will return as false if the date string has it omitted. Unsure if this is a bug or feature, but hopefully this will save someone some time.<?php///Example$input = "Feb 2010";$info = date_parse($input);var_dump($info);

A warning to some<?php$time = "00:14:38"$parse_date = date_parse($time);echo var_dump($parse_date) ."<br>";//here you will get what you expect

$time = "-00:14:38"$parse_date = date_parse($time);echo var_dump($parse_date) ."<br>";//here you will recieve hours minutes and seconds as booleans and as false and you will get error set to "Unexpected character"

$time = "00:-14:38"$parse_date = date_parse($time);echo var_dump($parse_date) ."<br>";//here you will recieve the same as the above

$time = "00:14:-38"$parse_date = date_parse($time);echo var_dump($parse_date) ."<br>";//here you will receive hours as 00 minutes as 14 and seconds as 0. The error will get set as the same as above. Meaning "Unexpected character"?>