Example
Return the Unix timestamp for today's date and time:
html
<?php
$date=date_create();
echo date_timestamp_get($date);
?>
Definition and Usage
The date_timestamp_get() function returns the Unix timestamp.
Syntax
text
date_timestamp_get(object)
Parameter Values
| Parameter | Description |
|---|---|
| object | Required. Specifies a DateTime object returned by date_create() |
Technical Details
| Return Value: | Returns the Unix timestamp that represents the date |
|---|---|
| PHP Version: | 5.3+ |