The functionality of getTimestamp() can be emulated in PHP 5.2 with the format() method:
<?php
// Given a DateTime object $dateTime:
$timestamp = $dateTime->format('U');
?>
DateTime::getTimestamp
(PHP 5 >= 5.3.0)
DateTime::getTimestamp — Unix タイムスタンプを取得する
説明
public int DateTime::getTimestamp
( void
)
Unix タイムスタンプを取得します。
パラメータ
この関数にはパラメータはありません。
返り値
その日付をあらわす Unix タイムスタンプを返します。
DateTime::getTimestamp
aharvey at php dot net
30-Oct-2009 05:05
30-Oct-2009 05:05
