PHP localtime() 函数
PHP 教程
· 2019-01-24 08:12:16
实例
以一个数值数组和一个关联数组的形式输出本地时间:
<?php
print_r(localtime());
echo "<br><br>";
print_r(localtime(time(),true));
?>
print_r(localtime());
echo "<br><br>";
print_r(localtime(time(),true));
?>
定义和用法
localtime() 函数返回本地时间。
语法
localtime(timestamp,is_assoc);
| 参数 | 描述 |
|---|---|
| timestamp | 可选。规定 Unix 时间戳。如果未规定 timestamp,则默认为当前的本地时间 time()。 |
| is_assoc | 可选。规定返回关联数组还是数值数组。如果为 FALSE,则返回数值数组。如果为 TRUE,则返回关联数组。默认为 FALSE。
关联数组的键名如下所示:
|
技术细节
| 返回值: | 返回包含 Unix 时间戳组件的数组。 |
|---|---|
| PHP 版本: | 4+ |
| 更新日志: | PHP 5.1.0:增加 E_STRICT 和 E_NOTICE 时区错误。 |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
An Introduction to the Analysis of Algorithms
Robert Sedgewick、Philippe Flajolet / Addison-Wesley Professional / 1995-12-10 / CAD 67.99
This book is a thorough overview of the primary techniques and models used in the mathematical analysis of algorithms. The first half of the book draws upon classical mathematical material from discre......一起来看看 《An Introduction to the Analysis of Algorithms》 这本书的介绍吧!
RGB转16进制工具
RGB HEX 互转工具
图片转BASE64编码
在线图片转Base64编码工具