Definition and Usage
|
strtotime(time,now) |
Parameter参数 | Description描述 |
---|---|
time | Required. Specifies the time string to parse 必要参数。指定需要被解析的时间字符串。 |
now | Optional. Specifies the timestamp used to calculate the returned value. If this parameter is omitted, current time is used 可选参数。指定用来计算返回值的时间戳。如果这个参数被忽略,那么将默认使用当前时间 |
Tips and Notes
注意点
Note: If the year is specified in a two-digit format, values between 0-69 are mapped to 2000-2069 and values between 70-100 are mapped to 1970-2000.
注意:如果时间是以两位数字的格式指定的,那么数字“0-69”指的是2000-2069年,数字“70-100”指的是1970-2000年。
Note: In PHP 5.1.0 this function returns false on failure (earlier versions returns -1).
注意:在 PHP 5.1.0版本中,如果函数失效,它将返回false(早期版本将返回 -1)。
Example
案例
<?php |
The output of the code above could be:
上述代码将输出下面的结果:
1138614504 |