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

24 lines
349 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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