DateTime::__wakeup
PHP Manual
PHP Manual»DateTimeInterface»DateTime::__wakeup

DateTime::__wakeup

DateTimeImmutable::__wakeup

DateTimeInterface::__wakeup

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

DateTime::__wakeup -- DateTimeImmutable::__wakeup -- DateTimeInterface::__wakeup — The __wakeup handler

Warning

This function has been DEPRECATED as of PHP 8.5.0. Relying on this function is highly discouraged.

Description

#[\Deprecated(
    since: '8.5',
    message: 'this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()',
)]

public function DateTime::__wakeup(): void
#[\Deprecated(
    since: '8.5',
    message: 'this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()',
)]

public function DateTimeImmutable::__wakeup(): void
#[\Deprecated(
    since: '8.5',
    message: 'this method is obsolete, as serialization hooks are provided by __unserialize() and __serialize()',
)]

public function DateTimeInterface::__wakeup(): void

The __wakeup() handler.

Parameters

This function has no parameters.

Return Values

Initializes a DateTime object.

To Top