Return the Unix timestamp for today's date and time:
<?php
$date=date_create();
echo date_timestamp_get($date);
?>
Try it Yourself »
The date_timestamp_get() function returns the Unix timestamp.
date_timestamp_get(
object)
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
Return Value: | Returns the Unix timestamp that represents the date |
---|---|
PHP Version: | 5.3+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!