PHP 4, PHP 5, PHP 7, PHP 8
time - Return current Unix timestamp

time( ): int

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


This function has no parameters.

Return Values

Returns the current timestamp.


Timestamp of the start of the request is available in $_SERVER['REQUEST_TIME'].

Related Functions

Example of time

Show all examples for time

PHP Version:

Function time:

Date and Time Functions

Most used PHP functions