For using strtotime(), we need to pass the date with any one of PHP supported date format, for example, dd/mm/yyyy, mm/dd/yyyy and etc.
And, for using mktime(), we need to explode the given date, and send the exploded components to this function.
So, we can use these list of date formatting characters to get date components or to format date if required, using given temporal data.
PHP provides list of supported strings to be passed as an argument of this function to denote date values.
For example, “Tuesday last week”, “ 1 week”, “21 November 2008” and etc.
similarly, for getting current timestamp value, we need to provide the string as “now” representing current date and time value. While invoking strtotime() by passing improper string data which is not supported by PHP, this function will return false.
This function is also used to get UNIX timestamp, but requires set of parameters denoting date components, like hour, minute, second, month, day, year, in the same order specified here.
microtime() is same as time() functions, which doesn’t require any parameter, but, there is an optional parameter $get_as_float. If it is TRUE, then microtime() will return float value representing accurate timestamp, otherwise, will return “microseconds seconds” formatted string.
And the code is, PHP supports several date format characters denoting components of the date value.For example, All the above PHP timestamp functions will return only the 10 digit timestamp value.But, while executing microtime() function, it will return number of second elapsed since, UNIX Epoch, and also, number of microseconds elapsed since seconds value returned by this function.PHP provides several date time functions to perform required operations with temporal data.Now, we are going to see about PHP timestamp functions.We are the site that helps you take dating at your own pace.