time()

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

Looking to contribute?

Learn PHP on Codecademy