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.

us
Visit us
code
Hide code
Code
Output
Hide output
Hide output
Loading...

All contributors

Looking to contribute?

Learn PHP on Codecademy