PHP getdate() Function
The getdate() function returns an array with date and
time information for a given timestamp or the current time if no timestamp is
given.
Syntax
getdate(?int $timestamp = null): array
Return Value
Returns an associative array containing date and time information, such as seconds, minutes, hours, mday, wday, mon, year, yday, weekday, and month.
Try It Online
Output
Click Run to execute your code
Related Functions
- idate() - Format custom date as integer
- localtime() - Get local time
Enjoying these tutorials?