DateTimeHelper.php 390 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: chenkuan
  5. * Date: 2017/11/3
  6. * Time: 下午2:39
  7. */
  8. namespace backend\helpers;
  9. class DateTimeHelper
  10. {
  11. /**
  12. * 获取毫秒级时间戳
  13. */
  14. public static function microtime_float()
  15. {
  16. list($t1, $t2) = explode(' ', microtime());
  17. return number_format(((floatval($t1) + floatval($t2)) * 1000), 0, '', '');
  18. }
  19. }