DateTimeImmutable::createFromMutable

DateTimeImmutable::createFromMutable

(PHP 5 >= 5.6.0, PHP 7)

DateTimeImmutable::createFromMutableReturns new DateTimeImmutable object encapsulating the given DateTime object

Description

public static DateTimeImmutable DateTimeImmutable::createFromMutable ( DateTime $datetime )

Parameters

datetime

The mutable DateTime object that you want to convert to an immutable version. This