Returns a Unix timestamp of today's date and time:
<?php$date=date_create();echo date_timestamp_get($date);?>The date_timestamp_get() function returns a Unix timestamp.
date_timestamp_get( object);
parameter | describe |
---|---|
object | Required. Specifies a DateTime object returned by date_create(). |
Return value: | Returns a Unix timestamp representing a date. |
---|---|
PHP version: | 5.3+ |