DateTimeImmutable::createFromFormat

PHP 5 >= 5.5.0, PHP 7, PHP 8
DateTimeImmutable::createFromFormat - Parses a time string according to a specified format
Manual

DateTimeImmutable::createFromFormat(
     string$format,
     string$datetime,
     [DateTimeZone|null$timezone = null]
): public static DateTimeImmutable|false

Procedural style

DateTimeImmutablefalsedate_create_immutable_from_format stringformat stringdatetime DateTimeZonenulltimezonenull

Function DateTimeImmutable::createFromFormat:

  • Manual

Date and Time Functions

Most used PHP functions