PHP date_timestamp_get() function

PHP date_time_set() function
PHP date_sunrise() function

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)
ParameterDescription
objectRequired. Specifies a DateTime object returned by date_create()
PHP date_timestamp_get() method

Examples of the date_timestamp_get() function

Example 1.

<?php
$d=date_create();
echo date_timestamp_get($d);
?>
PHP date_time_set() function
PHP date_sunrise() function
en English
X
Scroll to Top