freeCodeCamp/guide/chinese/php/functions/time/index.md

24 lines
349 B
Markdown
Raw Normal View History

---
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)