Home > Backend Development > PHP Tutorial > time(), date(), mktime(), strtotime() in php_PHP tutorial

time(), date(), mktime(), strtotime() in php_PHP tutorial

WBOY
Release: 2016-07-12 09:04:14
Original
1018 people have browsed it

time(), date(), mktime(), strtotime() in php

time(): returns the current Unix timestamp;
date(): format a local timestamp;
mktime (hour, minute, second, month, day, year): Get the timestamp of a date;
strtotime(): Parse any English text datetime description into a Unix timestamp
echo time();
echo date('Y-m-d H:i:s',time());
echo mktime(13,54,55,9,18,2015);
echo strtotime("now");
echo strtotime("10 September 2015");
echo strtotime(" 1 day");
echo strtotime(" 1 week");
echo strtotime("next Thursday");
echo strtotime("last Monday");

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1074129.htmlTechArticletime(), date(), mktime(), strtotime() time() in php: return the current Unix timestamp; date(): format a local timestamp; mktime (hour, minute, second, month, day, year): get a...
Related labels:
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