PHP hrtime() Function
The hrtime() function returns the system's high
resolution time. It is monotonic (cannot go backwards) and is best for precise
performance measurements.
Syntax
hrtime(bool $as_number = false): array|int|float
Return Value
Returns an array [seconds, nanoseconds] if as_number is false.
Returns nanoseconds as int (64-bit platforms) or float (32-bit platforms) if
as_number is true.
Try It Online
Output
Click Run to execute your code
Related Functions
- microtime() - Return current Unix timestamp with microseconds
Enjoying these tutorials?