PHP bindings for libnanotime for nanosecond precision timestamps.
Supported PHP versions:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
Supported OS:
- Linux
- macOS
# PHP 7.x example
use function nano\{
second as nanosecond,
time as nanotime
};
$currentNanoSecond = nanosecond(); // int(1381843170058990080)
$currentTimestampWithNanoSecondPrecision = nanotime(); // float(1381843170.059027910232543945312)
The nanotime is open source software licensed under the MIT License. See the LICENSE file for more.
Copyright (c) 2013 Lars Strojny
Copyright (c) 2017 Serghei Iakovlev