Return the current time:
<?php
// Print the array from gettimeofday()
print_r(gettimeofday());
// Print the float from gettimeofday()
echo gettimeofday(true);
?>
Try it Yourself »
The gettimeofday() function returns the current time.
gettimeofday(
return_float)
Parameter | Description |
---|---|
return_float | Optional. When set to TRUE, a float instead of an array is returned. Default is FALSE |
Return Value: | Returns an associative array by default, with the following array keys:
|
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.1.0: Added the return_float parameter |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!