PHP

 Home  Computers & Internet  Web Programming PHP
What is PHP?
Echo
Comments
Variables
Constants
Data Types
number_format()
Character Strings
Mathematical Operators
Comparison Operators
Logical Operators
Joining Strings
explode()
implode()
strtolower()
strtoupper()
strlen()
ucfirst()
ucwords()
strrev()
str_replace()
str_repeat()
trim()
strip_tags()
addslashes()
stripslashes()
strpos()
strrpos()
nl2br()
isset()
unset()
empty()
POST
GET
If Statements
If Else Statements
Elseif Statements
Switch Statements
For Loops
While Loops
Do While Loops
Foreach Loops
File Create
File Open
File Read
File Write
File Delete
fgets()
file_get_contents()
Date & Time
$_SERVER
Sessions
Cookies
Arrays

HOW TO USE THE microtime() FUNCTION IN PHP

The microtime() function returns the current Unix Timestamp in microseconds as a string.

In it's simple form:

echo microtime();

This will output:

0.45526900 1231206212

The string outputted is in the form: microseconds seconds. Both these are outputted in seconds format.

The microtime() function could also take an optional argument: get_as_float. If this is set to true, then the output is a float and not a string as follows:

echo microtime(true);

This will output:

1231206212.4553

See also:

date()
time()
mktime()
gmdate()
strtotime()

Home | Privacy Policy | Terms Of Use | Contact Us