PHP 7.2.7 Released

The DateTimeInterface interface

(PHP 5 >= 5.5.0, PHP 7)


DateTimeInterface is meant so that both DateTime and DateTimeImmutable can be type hinted for. It is not possible to implement this interface with userland classes.

Sommario dellla classe

DateTimeInterface {
/* Metodi */
public DateInterval diff ( DateTimeInterface $datetime2 [, bool $absolute = FALSE ] )
public string format ( string $format )
public int getOffset ( void )
public int getTimestamp ( void )
public DateTimeZone getTimezone ( void )
public __wakeup ( void )

Log delle modifiche

Versione Descrizione
5.5.8 Trying to implement DateTimeInterface raises a fatal error now. Formerly implementing the interface didn't raise an error, but the behavior was erroneous.

Indice dei contenuti

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top