Home >Backend Development >PHP Tutorial > mktime这个括号里的参数什么意思啊 看不太懂也看手册了,该怎么处理

mktime这个括号里的参数什么意思啊 看不太懂也看手册了,该怎么处理

WBOY
WBOYOriginal
2016-06-13 13:37:35965browse

mktime这个括号里的参数什么意思啊 看不太懂也看手册了
mktime(0, 0, 0, date('m'), date('d'), date('Y'));

------解决方案--------------------
int mktime ([ int $hour [, int $minute [, int $second [, int $month [, int $day [, int $year [, int $is_dst ]]]]]]] )
手册说的很清楚了,六个整形参数 时、分、秒、月、日、年,参数可从右向左省略,省略的默认为当前值
你的代码返回当天凌晨的时间戳,其实后面三个参数都可以省略了

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn