date_timestamp_get

Gets the Unix timestamp

Syntax

date_timestamp_get ( DateTimeInterface $object ) : int

Parameters

object

A DateTime object returned by date_create().

Return

Returns the Unix timestamp representing the date.

Examples

1

<?

$object = date_create();

$return = date_timestamp_get($object);

echo $return;

?>
1695358698
HomeMenu