array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'class.datetimeimmutable.php', 1 => 'DateTimeImmutable', ), 'up' => array ( 0 => 'book.datetime.php', 1 => 'Date/Time', ), 'prev' => array ( 0 => 'datetime.sub.php', 1 => 'DateTime::sub', ), 'next' => array ( 0 => 'datetimeimmutable.add.php', 1 => 'DateTimeImmutable::add', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/datetime/datetimeimmutable.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.datetimeimmutable.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.5.0, PHP 7, PHP 8)
Representation of date and time.
This class behaves the same as DateTime except new objects are returned when modification methods such as DateTime::modify() are called.
$format
, string $datetime
, ?DateTimeZone $timezone
= null
): DateTimeImmutable|false
Version | Description |
---|---|
7.1.0 |
The DateTimeImmutable constructor now includes the
current microseconds in the constructed value. Before this, it would
always initialise the microseconds to 0 .
|