xref: /PHP-8.2/ext/date/tests/bug46108.phpt (revision b895690d)
1--TEST--
2Bug #46108 (DateTime - Memory leak when unserializing)
3--FILE--
4<?php
5
6date_default_timezone_set('America/Sao_Paulo');
7
8var_dump(unserialize(serialize(new Datetime)));
9
10?>
11--EXPECTF--
12object(DateTime)#%d (3) {
13  ["date"]=>
14  string(%d) "%s"
15  ["timezone_type"]=>
16  int(%d)
17  ["timezone"]=>
18  string(%d) "America/Sao_Paulo"
19}
20