Here is the example of PHP time function that is used for returning current time.
Here is the example of PHP time function that is used for returning current time.The time() returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT). This function is similar to mktime() with no parameters or calling date ("U").
Syntax of time() Function in PHP
time(void)
Parameter of time() Function in PHP
void - void is optional parameter.
Example of time() Function in PHP:
<?php
$t=time();
echo($t . "<br />");
echo(date("D F d Y",$t));
?>
Output: The output of the code above could be:
1251523244
Fri Aug 29 2009