DateTime::getTimestamp
DateTimeImmutable::getTimestamp
DateTimeInterface::getTimestamp
date_timestamp_get
Gets the Unix timestamp
&reftitle.description;
&style.oop;
public intDateTime::getTimestamp
public intDateTimeImmutable::getTimestamp
public intDateTimeInterface::getTimestamp
&style.procedural;
intdate_timestamp_get
DateTimeInterfaceobject
Gets the Unix timestamp.
&reftitle.parameters;
&no.function.parameters;
&reftitle.returnvalues;
Returns the Unix timestamp representing the date.
&reftitle.examples;
DateTime::getTimestamp example
&style.oop;
getTimestamp();
?>
]]>
&style.procedural;
]]>
&examples.outputs.similar;
&reftitle.notes;
Using U as the parameter to
DateTime::format
is an alternative when using PHP 5.2.
&reftitle.seealso;
DateTime::setTimestamp
DateTime::format