Home > Backend Development > PHP Tutorial > date_format() 跟date()接受相同的参数,并返回相同的值,那么他们之间到底有什么差别

date_format() 跟date()接受相同的参数,并返回相同的值,那么他们之间到底有什么差别

WBOY
Release: 2016-06-06 20:47:29
Original
1106 people have browsed it

date_format() 跟date()接受相同的参数,并返回相同的值,那么他们之间到底有什么差别。
同义词么?

参考资料:
http://www.php.net/manual/zh/function.date.php
http://www.php.net/date_format

回复内容:

date_format() 跟date()接受相同的参数,并返回相同的值,那么他们之间到底有什么差别。
同义词么?

参考资料:
http://www.php.net/manual/zh/function.date.php
http://www.php.net/date_format

date_format()DateTime类的一个成员函数的别名。DateTime类是PHP5.2之后引入的类,除了比date()更优秀一点没什么差别。

The main difference between using the date() function and the DateTime object is that it's easier to modify the date values. —— DateTime In PHP

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template