DateTimeImmutable::createFromInterface
PHP 8
DateTimeImmutable::createFromInterface - Returns new DateTimeImmutable object encapsulating the given DateTimeInterface object
Manual
DateTimeImmutable::createFromInterface(
DateTimeInterface$object ): public static DateTimeImmutable
Parameters
- object
-
The DateTimeInterface object that needs to be converted to an immutable version. This object is not modified, but instead a new DateTimeImmutable object is created containing the same date, time, and timezone information.
Return Values
Returns a new DateTimeImmutable instance.