PHP getdate() 函数
定义和用法
getdate() 函数返回某个时间戳或者当前本地的日期/时间的日期/时间信息。
实例
返回当前本地的日期/时间的日期/时间信息:
<?php print_r(getdate()); ?>
语法
getdate(timestamp);
| 参数 | 描述 |
|---|---|
| timestamp | 可选。规定 Unix 时间戳,整数值。默认为当前本地时间(time())。 |
技术细节
| 返回值: |
返回带有与时间戳相关的信息的关联数组:
|
|---|---|
| PHP 版本: | 4+ |
getdate() 函数返回某个时间戳或者当前本地的日期/时间的日期/时间信息。
返回当前本地的日期/时间的日期/时间信息:
<?php print_r(getdate()); ?>
getdate(timestamp);
| 参数 | 描述 |
|---|---|
| timestamp | 可选。规定 Unix 时间戳,整数值。默认为当前本地时间(time())。 |
| 返回值: |
返回带有与时间戳相关的信息的关联数组:
|
|---|---|
| PHP 版本: | 4+ |