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
as_float
If used and set to true, microtime() will return a float instead of a string, as described in the return values section below.
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 7.4 / MySQL 5.7 is_null microtime
last run:
2023-01-14 22:02:45
26
- PHP 7.4 / MySQL 5.7 microtime round
last run:
2022-03-10 19:44:01
19
- PHP 8.0 / MySQL 5.7 microtime var_dump
last run:
2021-04-16 14:45:43
15
- PHP 7.4 / MySQL 5.7 srand microtime rand
last run:
2022-11-30 22:41:40
14
- PHP 7.4 / MySQL 5.7 srand microtime rand
last run:
2022-11-30 22:42:03
9
- PHP 8.0 / MySQL 5.7 microtime mb_substr
last run:
2022-02-08 14:49:10
9
- PHP 8.0 / MySQL 5.7 microtime printf
last run:
2021-12-28 20:23:52
9
- PHP 8.0 / MySQL 5.7 microtime printf
last run:
2021-12-28 20:30:05
9
- PHP 7.4 / MySQL 5.7 microtime round
last run:
2021-04-14 08:39:38
9
- PHP 7.4 / MySQL 5.7 microtime round count var_dump
last run:
2021-04-14 10:35:54
9
microtime - New snippets
-
PHP 8.2.13 / MariaDB 10 usleep mt_rand microtime
added at:
2024-03-28 10:28:26
3
-
PHP 8.2.13 / MariaDB 10 microtime usleep
added at:
2024-03-28 10:26:52
4
-
PHP 8.1 / MySQL 5.7 curl_init number_format microtime md5
added at:
2024-02-27 06:53:25
2
-
PHP 8.1 / MySQL 5.7 curl_init number_format microtime md5 curl_setopt_array
added at:
2024-02-27 06:52:25
1
-
PHP 8.1 / MySQL 5.7 microtime var_dump array_reduce array_search
added at:
2024-01-19 11:48:25
3
-
PHP 8.1 / MySQL 5.7 var_dump microtime array_reduce array_search
added at:
2024-01-19 11:47:48
1
-
PHP 8.1 / MySQL 5.7 var_dump microtime array_reduce array_search
added at:
2024-01-19 11:47:39
1
-
PHP 8.1 / MySQL 5.7 var_dump microtime array_reduce array_search
added at:
2024-01-19 11:47:17
1
-
PHP 8.1 / MySQL 5.7 var_dump microtime array_reduce array_search
added at:
2024-01-19 11:46:51
1
-
PHP 8.1 / MySQL 5.7 microtime array_reduce var_dump array_search
added at:
2024-01-19 11:43:50
1