[php-src] Issue #8152: Cannot hydrate a DateTime instance created without the constructor
| From: | nicolas-grekas | Date: | Thu, 24 Feb 2022 21:49:02 +0000 |
| Subject: | [php-src] Issue #8152: Cannot hydrate a DateTime instance created without the constructor | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-240022@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8152
Comment Author: nicolas-grekas
I could work with that I think, but then I figured this does work with child classes of eg DateTime:
```php
class Foo extends DateTime
{
}
echo get_class(Foo::__set_state([
'date' => '1970-01-01 00:00:00.000000',
'timezone_type' => 1,
'timezone' => '+00:00',
]));
```