Search code examples
phpmicrotime

PHP - Microtime


How php microtime generated, why only 13 - 15 numbers returned and if i write time manually like this:

<?php
$time = date('SAMPLE').date('SAMPLE').date('SAMPLE').date('SAMPLE').date('SAMPLE');
$TIME = microtime(true);
?>

and microtime look too short for contains all of date (Year,Month,Date,Hour,Minute,second) Is microtime really unique ?

Please give your opinion ...

Thanks


Solution

  • microtime() returns the current Unix timestamp with microseconds. This function is only available on operating systems that support the gettimeofday() system call.

    If you want to convert the timestamp into a human-readable date look at the date() function.