摘要:
下文讲述php中date_parse_from_format函数的功能说明,如下所示;
php之date_parse_from_format函数功能
php之date_parse_from_format函数:
将输入的字符串信息格式化为一个日期时间信息数组
php之date_parse_from_format函数语法:
date_parse_from_format(format,date);
--------参数说明----
format:必填参数, 输入php可接收的格式串
date:必填参数,一个日期时间字符串
-------返回值说明-----
函数运行成功则返回一个数组,里面包含一些日期信息
例
php之date_parse_from_format函数的示例说明
echo "maomao365.com php date_parse_from_format函数示例分享\n";
print_r(date_parse_from_format("mmddyyyy","09112020"));
?>
//输出
maomao365.com php date_parse_from_format函数示例分享
Array
(
[year] =>
[month] => 11
[day] => 20
[hour] =>
[minute] =>
[second] =>
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 1
[errors] => Array
(
[8] => Data missing
)
[is_localtime] =>
)