PHP Salt


A little dash of PHP... my collection of php functions

Version: 2.34.4
Last Build: March 13, 2025 23:10pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
db
file
graph
html
mail
math
misc
mobile
script
string
system
time
web
psMicroTime()
Micro Time - Float


Description:

This returns a float value of time in seconds with a decimal

Note: This function was coppied directly from the php site

http://php.net/manual/en/function.microtime.php





Usage:


$varFloat = psMicroTime();






Example:


<?php

$time_start = psMicroTime();

// Sleep for a while
usleep(100);

$time_end = psMicroTime();
$time = $time_end - $time_start;

echo "Did nothing in $time seconds\n";

?>






Code:


function psMicroTime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}



Changlelog:


See Also

And a shot out to:

PHP - php.net
Fedora Server - getfedora.com
Shameless ads to pay for site