PHP microtime() Function

What is a microtime Function?

Explanation

The "microtime()" function return the current time stamp Unix timestamp with microseconds

Syntax:

microtime ($get_as_float)

In the above syntax the optional parameter for the function is "get_as_float" if set to "true" it should return a float instead of string.

Example :


<?php
echo(microtime());
?>
Result :

0.25139300 1138197510

In the above example the microtime() function returns the values of micro seconds.

Note :

(PHP 4, PHP 5)

PHP Topics


Ask Questions

Ask Question