PHP getdate () function
PHP Date / Time Reference Manual
Examples
Local returns the current date / time, date / time information:
<?php
print_r(getdate());
?>
print_r(getdate());
?>
Running instance »
Definition and Usage
getdate () function returns the date of a timestamp or the current local date / time / time information.
grammar
getdate( timestamp);
参数 | 描述 |
---|---|
timestamp | 可选。规定整数的 Unix 时间戳。默认为当前本地时间(time())。 |
technical details
return value: | Returns associative array with the timestamp information related to:
|
---|---|
PHP version: | 4+ |
PHP Date / Time Reference Manual