PHP: time - Manual in Deutsh
PHP: time - Manual in French
PHP: time - Manual in Polish

You Are At PHP: time - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

time

(PHP 3, PHP 4, PHP 5)

time -- Return current Unix timestamp

Description

int time ( void )

Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).

Examples

Example 1. time() example

<?php
$nextWeek
= time() + (7 * 24 * 60 * 60);
                   
// 7 days; 24 hours; 60 mins; 60secs
echo 'Now:       '. date('Y-m-d') ."\n";
echo
'Next Week: '. date('Y-m-d', $nextWeek) ."\n";
// or using strtotime():
echo 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."\n";
?>

The above example will output something similar to:

Now:       2005-03-30
Next Week: 2005-04-06
Next Week: 2005-04-06

Notes

Tip: Timestamp of the start of the request is available in $_SERVER['REQUEST_TIME'] since PHP 5.1.

See Also

date()
microtime()

Internet
Szkolenia to norma dla każdego. Norma dla każdego.
zegarki szwajcarskie
Skuteczne pozycjonowanie stron katowice i cała Polska.
Pomoc drogowa 24h

Another Useful functions:


zend-macro.vcwd-utime | zend-api.zend-unset-timeout | zend-api.zend-timeout | zend-api.zend-set-timeout | zend-api.virtual-utime | timezones.pacific | timezones.others | timezones.indian | timezones | timezones.europe | timezones.australia | timezones.atlantic | timezones.asia | timezones.arctic | timezones.antarctica | timezones.america | ref.datetime | migration52.datetime | function.variant-date-to-timestamp | function.variant-date-from-timestamp | function.timezone-transitions-get | function.timezone-open | function.timezone-offset-get | function.timezone-name-get | function.timezone-name-from-abbr | function.timezone-identifiers-list | function.timezone-abbreviations-list | function.time | function.time-sleep-until | function.time-nanosleep | function.strtotime | function.strptime | function.strftime | function.stream-set-timeout | function.sqlite-busy-timeout | function.socket-set-timeout | function.set-time-limit | function.set-magic-quotes-runtime | function.rar-getfiletime | function.px-timestamp2string | function.posix-times | function.newt-form-set-timer | function.ncurses-timeout | function.msession-timeout | function.mktime | function.microtime | function.mcal-time-valid | function.m-settimeout | function.m-maxconntimeout | function.localtime | function.imap-timeout | function.ibase-timefmt | function.gmstrftime | function.gmmktime | function.gettimeofday | function.get-magic-quotes-runtime | function.filemtime | function.filectime | function.fileatime | function.directoryiterator-getmtime | function.directoryiterator-getctime | function.directoryiterator-getatime | function.date-timezone-set | function.date-timezone-get | function.date-time-set | function.date-default-timezone-set | function.date-default-timezone-get | function.connection-timeout | function.apache-reset-timeout |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.