microtime
Returns the current Unix timestamp with microseconds for high-precision timing measurements.
Parameters
main.php
Return Values
string|float
Returns current time with microsecond precision
On success:String 'microseconds seconds' or float timestamp
On failure:Never fails - always returns current time
Notes
- Use as_float=true to get float value for easier calculations
- Essential for performance monitoring and benchmarking
- Provides microsecond precision (6 decimal places)
- More precise than time() function for measurement tasks
Changelog
- 5.0.0: as_float parameter added
Related Functions
round
MathRounds a float to the specified number of decimal places using specified rounding mode.
mathprecisioncalculate