time()

StevenSwiniarski's avatar
Published May 23, 2022
Contribute to Docs

The time() function returns the current time measured in seconds from the Unix Epoch, Midnight GMT January 1, 1970.

Codebyte Example

The example below prints out the Unix timestamp for the current date.

Code
Output
Loading...

All contributors

Contribute to Docs

Learn PHP on Codecademy