The __set_state handler

DateTime::modify
DateTime::setDate
DateTime
PHP Manual

# DateTime::__set_state

(PHP 5 >= 5.2.0, PHP 7)

DateTime::__set_state — The __set_state handler

### Description

public static DateTime DateTime::__set_state ( array `$array` )

The __set_state() handler.

### Parameters

`array`

  Initialization array.

### Return Values

Returns a new instance of a DateTime object.

DateTime::modify
DateTime::setDate
DateTime
PHP Manual