PHP date_timestamp_get() Function

Definition

The date_timestamp_get() function returns the Unix timestamp.

Syntax

PHP date_timestamp_get() Function has the following syntax.

date_timestamp_get(object);

Parameter

PHP date_timestamp_get() Function has the following parameter.

object - Required. DateTime object returned by date_create()

Return

PHP date_timestamp_get() Function returns the Unix timestamp that represents the date.

Example

Return the Unix timestamp for today's date and time:


<?php
$date=date_create();
echo date_timestamp_get($date);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions