DateTime::createFromInterface

PHP 8
DateTime::createFromInterface - Returns new DateTime object encapsulating the given DateTimeInterface object
Manual
Code Examples

DateTime::createFromInterface( DateTimeInterface$object ): public static DateTime

Parameters

object

The DateTimeInterface object that needs to be converted to a mutable version. This object is not modified, but instead a new DateTime object is created containing the same date, time, and timezone information.

Return Values

Returns a new DateTime instance.

Example of DateTime::createFromInterface

Show all examples for DateTime::createFromInterface

PHP Version:


Function DateTime::createFromInterface:

Date and Time Functions

Most used PHP functions