microtime
microtime — Return current Unix timestamp with microseconds.Description
microtime( bool $as_float = false ): string|floatmicrotime() returns the current Unix timestamp with microseconds. This function is only available on operating systems that support the gettimeofday() system call. For performance measurements, using hrtime() is recommended.
Parameters
Return Values
By default, microtime() returns a string in the form "msec sec", where sec is the number of seconds since the Unix epoch (0:00:00 January 1,1970 GMT), and msec measures microseconds that have elapsed since sec and is also expressed in seconds.If as_float is set to true, then microtime() returns a float, which represents the current time in seconds since the Unix epoch accurate to the nearest microsecond.
More information about microtime on official PHP documentation site
microtime - Popular snippets
- PHP 8.2 / microtime round explode end
last run:
2024-08-30 19:40:32
35
- PHP 7.4 / is_null microtime
last run:
2023-01-14 22:02:45
26
- PHP 7.4 / microtime round
last run:
2022-03-10 19:44:01
19
- PHP 8.1 / explode end microtime number_format
last run:
2024-08-28 06:55:16
17
- PHP 8.1 / print_r microtime time
last run:
2024-07-27 21:40:12
15
- PHP 8.1 / print_r microtime
last run:
2024-07-27 21:38:28
15
- PHP 8.0 / microtime var_dump
last run:
2021-04-16 14:45:43
15
- PHP 7.4 / srand microtime rand
last run:
2022-11-30 22:41:40
14
- PHP 8.2 / MySQL 8.0 in_array print_r microtime
last run:
2024-03-30 16:28:44
12
- PHP 8.2 / microtime
last run:
2024-06-14 18:40:38
11
microtime - New snippets
-
PHP 8.4 / MySQL 8.0 round microtime file_get_contents json_decode json_encode hash_hmac
added at:
2025-05-14 16:23:23
1
-
PHP 7.4 / MySQL 8.0 explode microtime substr time mktime
added at:
2025-05-12 11:51:43
1
-
PHP 7.4 / MySQL 8.0 explode microtime substr time mktime
added at:
2025-05-12 11:49:11
1
-
PHP 7.4 / MySQL 8.0 explode microtime substr time mktime
added at:
2025-05-12 11:49:04
1
-
PHP 8.3 / MySQL 8.0 microtime range array_merge
added at:
2025-05-02 08:13:46
4
-
PHP 8.3 / MySQL 8.0 microtime range array_merge
added at:
2025-05-02 08:13:35
3
-
PHP 8.3 / MySQL 8.0 microtime range array_merge
added at:
2025-05-02 08:13:10
1
-
PHP 8.3 / MySQL 8.0 microtime range array_merge
added at:
2025-05-02 08:11:42
3
-
PHP 8.1 / MariaDB 11.4 extract var_dump microtime
added at:
2025-02-20 02:58:04
1
-
PHP 8.1 / MariaDB 11.4 extract var_dump microtime
added at:
2025-02-20 02:57:44
1