Skip to content

Date and Time Functions

PHP provides many built-in functions to work with dates and time.

Common functions include:

  • date()
  • time()
  • strtotime()
  • getdate()

These functions allow developers to retrieve, format, and manipulate date values.

echo date("Y-m-d");
echo date("H:i:s");