The PHP getdate() function returns an array containing the date information of Unix timestamp, or the current local time.
Syntax of getdate() function in PHP
Parameter of getdate() function in PHP
timestamp - The optional timestamp parameter is an integer Unix timestamp that defaults to the current local time if a timestamp is not given. In other words, it defaults to the value of time().
The returning array contains ten elements with relevant information needed when formatting a date string:
seconds - The numeric representation of seconds - It returns 0 to 59
minutes - The numeric representation of minutes - It returns 0 to 59
hours - The numeric representation of hours - It returns 0 to 23
mday - The numeric representation of day of the month - It returns 1 to 31.
wday - The numeric representation of day of the week - It returns 0 (for Sunday) to 6 (for Saturday)
year - A full numeric representation of year in four digits like 1998, 2009
yday - The numeric representation of day of the year - It returns 0 through 365
weekday - A full textual representation of name of the week - Sunday through Saturday
month - A full textual representation of name of the month like January or March
0 Seconds since the Unix Epoch, similar to the values returned by time() and used by date() - System Dependent, typically -2147483648 through 2147483647.
Example of getdate() function in PHP:
[seconds] => 24
[minutes] => 32
[hours] => 21
[mday] => 12
[wday] => 3
[mon] => 1
[year] => 2009
[yday] => 26
[weekday] => Thursday
[month] => August
 => 1076511381
Recommend the tutorial