In this article, you will learn about getting Unixaaaaa timestamp from the specified date and time. THe date_timestamp_get() function returns the UNIX timestamp of the specified date/time.
What is the syntax of the date_timestamp_get() function in PHP?
date_timestamp_get(object)
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
Examples of the date_timestamp_get() function
Example 1.
<?php
$d=date_create();
echo date_timestamp_get($d);
?>