PHP getdate() Function
Example
Return the date/time information for the current local date/time:
<?php print_r(getdate()); ?>
Definition and Usage
The getdate() function returns a timestamp or date/time information for the current local date/time.
Syntax
getdate(timestamp);
Parameter | Description |
---|---|
timestamp | Optional. Specifies a Unix timestamp, integer value. Defaults to the current local time (time()). |
Technical Details
Return value: |
Return an associative array with information related to the timestamp:
|
---|---|
PHP Version: | 4+ |