PHP microtime() Function

PHP microtime Function


Definition : 

In php microtime() Function is inbuilt function.PHP microtime() function is used to return the current Unix timestamp with microseconds. It accepts only a single parameter which is optional. It returns the string microsec sec as output.

Syntax

    microtime(return_float);

Parameter
Parameter Description
return_float Optional. When set to TRUE it specifies that the function should return a float, instead of a string. Default is FALSE

Given below example return the current Unix timestamp with microseconds:

Output : 0.89925400 1641448590
             1641448590.8993