DateTimeImmutable::createFromMutable

PHP 5 >= 5.6.0, PHP 7, PHP 8
DateTimeImmutable::createFromMutable - Returns new DateTimeImmutable object encapsulating the given DateTime object
Manual
Code Examples

Example #1 Creating an immutable date time object

PHP Version:


Function DateTimeImmutable::createFromMutable:

Date and Time Functions

Most used PHP functions