Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP gettimeofday() Function

PHP gettimeofday() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Return the current time:

Run Example »


Definition and Usage

The gettimeofday() function returns the current time.

Syntax

gettimeofday(

return_float);

Parameters Description
return_float Optional. When set to TRUE, returns a float instead of an array. Default is FALSE.

Technical Details

| Return Value: | By default returns an associative array with the following keys: R

If the *return_float* parameter is set to true, returns a float. | | --- | --- | | PHP Version: | 4+ | | Changelog: | PHP 5.1.0: The *return_float* parameter was added. |

PHP Date/Time PHP Date/Time Reference Manual