Return the date and time information for the current local date and time.
| <?php print_r(getdate()); ?> |
The getdate() function returns date and time information for a specified timestamp or the current local date and time if no timestamp is provided.
| getdate(timestamp) |
|
Parameter |
Description |
|
timestamp |
Optional. Specifies an integer Unix timestamp; defaults to the current local time ( |
|
Return Value: |
Returns an associative array with information related to the timestamp:
[0] – seconds since Unix Epoch |
|
PHP Version: |
4+ |