PHP 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.

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours

Codebyte Example

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

Code
Output

All contributors

Contribute to Docs

Learn PHP on Codecademy

  • Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
    • Includes 6 Courses
    • With Professional Certification
    • Beginner Friendly.
      75 hours