DateTime::formatDateTimeImmutable::formatDateTimeInterface::formatdate_formatReturns date formatted according to given format BeschreibungObjektorientierter Stil
public string DateTime::format
( string
$format
)
public string DateTimeImmutable::format
( string
$format
)
public string DateTimeInterface::format
( string
$format
)Prozeduraler Stil
string date_format
( DateTimeInterface
$object
, string $format
)Returns date formatted according to given format. Parameter-Liste
Rückgabewerte
Returns the formatted date string on successIm Fehlerfall wird BeispieleBeispiel #1 DateTime::format example Objektorientierter Stil
<?phpProzeduraler Stil
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe: 2000-01-01 00:00:00 AnmerkungenThis method does not use locales. All output is in English. Siehe auch
|