214 of 410 menu

The microtime Function

The microtime function returns time in timestamp format with microseconds. The timestamp format is the number of seconds elapsed since January 1, 1970 year to the specified point in time.

This function can be used, for example, to calculate the script execution time.

Syntax

microtime();

Example

This example outputs the current point in time with milliseconds:

<?php echo microtime(); ?>

See Also

  • the time function,
    which returns time in timestamp format
byenru