Time Function :

1. time() :
Syntax int time();
It returns the current time stamp as type of integer.
example :

time();

Explanation :
  	
	<?php
	    $nextWeek = time() + (7 * 24 * 60 * 60);      // 7 days; 24 hours; 60 mins; 60secs
	    print 'Now:'. date('Y-m-d') ."\n";
	    print 'Next Week: '. date('Y-m-d', $nextWeek) ."\n";
	    // or using strtotime():
	    print 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."\n";
	?>
    
Output :
Now: 2009-08-21
Next Week: 2009-08-27
Next Week: 2009-08-27
2. mktime():
Syntax int mktime(hour,minute,second,month,day,year);
Its return type is Integer.
example:

date("M-d-Y", mktime(0, 0, 0, 12, 3, 2008))

Explanation:

mktime() function returns a unique timestamp of the specified parameter given in the argument list.

  	
<?php
    $nextWeek = time() + (7 * 24 * 60 * 60);      // 7 days; 24 hours; 60 mins; 60secs
    print 'Now:'. date('Y-m-d') ."\n";
    print 'Next Week: '. date('Y-m-d', $nextWeek) ."\n";
    // or using strtotime():
    print 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."\n";
?>
Output :
Jan-01-2009
Jan-01-2009
Jan-01-2008
3. strftime() :
Syntax string strftime ( string $format [, int $timestamp = time() ] )
Its return type is the String.
example :

strftime('%A');

Explanation :

Prints the unique timestamp according to the parameter.

  	
<?php
    print strftime("%A");
?>
Output :
Wednesday

Some specific characters are used in the parameter of the strftime()function

%a - abbreviated weekday name according to the current locale

%A - full weekday name according to the current locale

%b - abbreviated month name according to the current locale

%B - full month name according to the current locale

%c - preferred date and time representation for the current locale

%d - day of the month as a decimal number (range 01 to 31)

%H - hour as a decimal number using a 24-hour clock (range 00 to 23)

%I - hour as a decimal number using a 12-hour clock (range 01 to 12)

%m - month as a decimal number (range 01 to 12)

%M - minute as a decimal number

%n - newline character

%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale

%t - tab character

4. strtotime() :
Syntax int strtotime ( string time [, int now]);
Returns a timestamp on success, FALSE otherwise.
example :

strtotime( 10 December 2008 );

Explanation :

Parse about any English textual datetime description into a Unix.

  	
<?php
    print strtotime("now")."
"; print strtotime("10 September 2008")."
"; print strtotime("+1 day")."
"; print strtotime("+1 week")."
"; print strtotime("+1 week 2 days 4 hours 2 seconds")."
"; print strtotime("next Thursday")."
"; print strtotime("last Monday")."
"; ?>
Output :
1229344378
1220985000
1229430778
1229949178
1230136380
1229538600
1228674600
After editing Click here:
Output:
Hello World