PHP time

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : time() function

Description

The time() function returns the current time as Unix timestamp. The Unix timestamp measures time as a number of seconds since midnight of Greenwich Mean Time on January 1, 1970.

Version

(PHP 4 and above)

Syntax

time()

Return value

Current Unix timestamp

Value Type : Integer.

Example :

  1. <?php  

  2. $curr_time  = time();  

  3. echo(date('D F d Y', $curr_time));  

  4. ?>