您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php getdate函数怎么用

2024/3/12 7:18:45发布17次查看
php getdate函数用于返回当前本地的“日期/时间”的“日期/时间”信息,其语法为“getdate(timestamp)”,该函数会返回带有与时间戳相关的信息的关联数组。
php getdate()函数用于返回当前本地的日期/时间的日期/时间信息,语法为getdate(timestamp)。该函数会返回带有与时间戳相关的信息的关联数组。
php getdate函数怎么用?
作用:返回当前本地的日期/时间的日期/时间信息
语法:
getdate(timestamp)
参数:
timestamp 可选。规定 unix 时间戳,整数值。默认为当前本地时间(time())。
说明:返回带有与时间戳相关的信息的关联数组:[seconds] - 秒,[minutes] - 分,[hours] - 小时,[mday] - 一个月中的第几天,[wday] - 一周中的某天,[mon] - 月,[year] - 年,[yday] - 一年中的某天,[weekday] - 星期几的名称,[month] - 月份的名称,[0] - 自 unix 纪元以来经过的秒数。
php getdate()函数 示例
<?phpprint_r(getdate(1524123066));?>
输出:
array ( [seconds] => 6 [minutes] => 31 [hours] => 15 [mday] => 19 [wday] => 4 [mon] => 4 [year] => 2018 [yday] => 108 [weekday] => thursday [month] => april [0] => 1524123066 )
本篇文章就是关于getdate()函数的使用方法介绍,希望对需要的朋友有所帮助!
以上就是php getdate函数怎么用的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product