The getdate() function returns date/time information of a timestamp or the current local date/time.
PHP getdate() Function has the following syntax.
getdate(timestamp);
PHP getdate() Function has the following parameter.
timestamp - Optional. An integer Unix timestamp. Default is the current local time (time())
PHP getdate() Function returns an associative array with information related to the timestamp:
Return date/time information of the current local date/time:
<?php
print_r(getdate());
?>
The code above generates the following result.