Home >Backend Development >PHP Tutorial >PHP implementation method of returning 13-digit timestamp
This article mainly introduces the implementation method of PHP returning 13-digit timestamp. Interested friends can refer to it. I hope it will be helpful to everyone.
The 13-digit timestamp generation function is as follows:
private function getMillisecond() { list($t1, $t2) = explode(' ', microtime()); return (float)sprintf('%.0f',(floatval($t1)+floatval($t2))*1000); }
Summary: The above is all of this article Content, I hope it will be helpful to everyone’s study.
Related recommendations:
PHP connects to the MySQL database and outputs it in json format
PHP method to implement a certain key sorting of a two-dimensional array
The above is the detailed content of PHP implementation method of returning 13-digit timestamp. For more information, please follow other related articles on the PHP Chinese website!