返回当前时间:
<?php // Print the array from gettimeofday() print_r(gettimeofday()); // Print the float from gettimeofday() echo gettimeofday(true); ?>
gettimeofday() 函数返回当前时间。
| 参数 | 描述 |
|---|---|
| return_float | 可选。当设置为 TRUE 时,返回一个浮点数,而不是一个数组。默认是 FALSE。 |
| 返回值: | 默认返回一个关联数组,带有如下数组键名:R
|
|---|---|
| PHP 版本: | 4+ |
| 更新日志: | PHP 5.1.0:新增了return_float 参数。 |
PHP Date/Time 参考手册 在线实例
字符集 & 工具
最新更新
站点信息