php使用gettimeofday函數(shù)返回當(dāng)前時間并存放在關(guān)聯(lián)數(shù)組里
本文實(shí)例講述了php使用gettimeofday函數(shù)返回當(dāng)前時間并存放在關(guān)聯(lián)數(shù)組里的方法。分享給大家供大家參考。具體分析如下:
英文官方描述如下:
Key Description
sec Seconds since midnight before January 1, 1970
usec Microseconds since the sec value
minuteswest
Local time zone difference from GMT, in minutes
dsttime 1 iff daylight savings time is in effect,
0 iff not.
<?php
$Now = gettimeofday();
echo "As an associative array:\n";
foreach ($Now as $Key => $Value) {
echo "$Key => $Value\n";
}
?>
輸出結(jié)果如下:
sec => 1261918156 usec => 724964 minuteswest => 0 dsttime => 0
希望本文所述對大家的php程序設(shè)計(jì)有所幫助。
相關(guān)文章
關(guān)于Sphinx創(chuàng)建全文檢索的索引介紹
本篇文章是對使用Sphinx創(chuàng)建全文檢索的索引進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下2013-06-06
php利用scws實(shí)現(xiàn)mysql全文搜索功能的方法
這篇文章主要介紹了php利用scws實(shí)現(xiàn)mysql全文搜索功能的方法,可通過scws分詞插件的擴(kuò)展來實(shí)現(xiàn)MySQL全文搜索功能,是非常實(shí)用的技巧,需要的朋友可以參考下2014-12-12

