Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Created September 26, 2014 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lewiscowles1986/ed1646c6e5d610abe164 to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/ed1646c6e5d610abe164 to your computer and use it in GitHub Desktop.
microtime str
echo time()."\r\n";
var_dump( microtime_str() );
var_dump( microtime_str() );
var_dump( microtime_str() );
var_dump( microtime_str() );
var_dump( microtime_str() );
var_dump( microtime_str() );
var_dump( microtime_str() );
var_dump( microtime_str() );
var_dump( microtime_str() );
function microtime_str() {
list($usec, $sec) = explode(" ", microtime());
$usec = str_replace("0.","-",$usec);
return "{$sec}{$usec}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment