Share on Google+Share on Google+

time ()

Here is the example of PHP time function that is used for returning current time.

PHP time() Function

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


Parameter of time() Function in PHP

void - void is optional parameter. 

Example of time() Function in PHP:

echo($t . "<br />");
echo(date("D F d Y",$t));

Output: The output of the code above could be:

Fri Aug 29 2009


Posted on: August 29, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null