24 lines
349 B
Markdown
24 lines
349 B
Markdown
|
---
|
|||
|
title: Time
|
|||
|
localeTitle: 时间
|
|||
|
---
|
|||
|
## 时间
|
|||
|
|
|||
|
`time()`函数返回当前的unix时间戳(自Unix Epoch以来的秒数 - 1970年1月1日00:00:00 GMT)。
|
|||
|
|
|||
|
### 例
|
|||
|
|
|||
|
```php
|
|||
|
<?php
|
|||
|
echo time();
|
|||
|
```
|
|||
|
|
|||
|
**输出:**
|
|||
|
|
|||
|
```text
|
|||
|
1511732226
|
|||
|
```
|
|||
|
|
|||
|
#### 更多信息:
|
|||
|
|
|||
|
* [php.net time()手册](https://secure.php.net/manual/en/function.time.php)
|