Returns the microseconds of the current Unix timestamp:
<?phpecho(microtime());?>The microtime() function returns the number of microseconds in the current Unix timestamp.
microtime( get_as_float);
parameter | describe |
---|---|
get_as_float | Optional. When set to TRUE, specifies that the function should return a floating point number, otherwise it returns a string. Default is FALSE. |
Return value: | By default, the string "microsec sec" is returned, where sec is the number of seconds since the Unix epoch (0:00:00 January 1, 1970 GMT) and microsec is the microsecond part. If the get_as_float parameter is set to TRUE, returns a floating point number representing the current time in seconds since the Unix epoch, accurate to microseconds. |
---|---|
PHP version: | 4+ |
Update log: | PHP 5.0.0: Added get_as_float parameter. |