Hand-drawn a graph to summarize the processing function of time in PHP
The first timestamp is a string of numbers such as "1441202665", although people seem to be in trouble, but the computer can easily identify such a time representation.
So the time it takes to see the computer is a timestamp, which gives the person the "2015-09-02 22:25:30" string.
Time () Gets the current timestamp, the return type is int
Microtime () returns a string that consists of the current time's subtle number and timestamp, and returns the subtle number as the fractional part of the float if there is true as a parameter
Mktime (Hour,minute,second,month,day,year) converts the time represented by the parameter to a timestamp and returns. Note the parameter order
Strtotime () Converts a string into a timestamp and returns, as
Strtotime ("Now-1 Day"); The timestamp at this time yesterday
Strtotime ("Now +1 Day"); The time stamp for tomorrow.
In addition to day, you can also use week, month
Strtotime ("2015-09-02"); time stamp of//2015-09-02 00:00:00
Strtotime ("2015-09-02 22:39:30"); Returns the timestamp of the 2015-09-02 22:39:30
Here are a few other examples:
Strtotime ("2015/09/02 22:39:30");
Strtotime ("20150902 22:39:30");
Strtotime ("20150902 223930");
Strtotime ("20150902223930");
The above form returns the same result
Basically, as long as you carefully write the normal time format string, the Strtotime can be turned into timestamps.
The study of PHP time function