hrtime
Description
The hrtime of Miscellaneous for PHP get the system's high resolution time.
Syntax
hrtime(
bool $as_number = false
): array|int|float|falseParameters
as_number
Whether the high resolution time should be returned as array or number.
Return
Returns an array of integers in the form [seconds, nanoseconds], if the parameter as_number is false. Otherwise the nanoseconds are returned as int (64bit platforms) or float (32bit platforms). Returns false on failure.
Examples
1 · void
<? $return = hrtime(); print_r($return);
Array
(
[0] => 9878696
[1] => 466689007
)
2 · as_number · false
<? $as_number = false; $return = hrtime($as_number); print_r($return);
Array
(
[0] => 9878696
[1] => 523634752
)
3 · as_number · true
<? $as_number = true; $return = hrtime($as_number); echo $return;
Array
(
[name] => default output handler
[type] => 0
[flags] => 112
[level] => 1
[chunk_size] => 0
[buffer_size] => 16384
[buffer_used] => 0
)