1--TEST--
2Test DateTimeZone::__serialize and DateTime::__unserialize
3--FILE--
4<?php
5$tz = new DateTimeZone("CEST");
6var_dump($tz->__serialize());
7
8$tz = new DateTimeZone("UTC");
9$tz->__unserialize(
10	[
11		'timezone_type' => 3,
12		'timezone' => 'Europe/London',
13	]
14);
15var_dump($tz);
16
17$tz->__unserialize(
18	[
19		'timezone_type' => 2,
20		'timezone' => 'CEST',
21	]
22);
23var_dump($tz);
24
25$tz->__unserialize(
26	[
27		'timezone_type' => 1,
28		'timezone' => '+0130',
29	]
30);
31var_dump($tz);
32
33?>
34--EXPECTF--
35array(2) {
36  ["timezone_type"]=>
37  int(2)
38  ["timezone"]=>
39  string(4) "CEST"
40}
41object(DateTimeZone)#%d (%d) {
42  ["timezone_type"]=>
43  int(3)
44  ["timezone"]=>
45  string(13) "Europe/London"
46}
47object(DateTimeZone)#%d (%d) {
48  ["timezone_type"]=>
49  int(2)
50  ["timezone"]=>
51  string(4) "CEST"
52}
53object(DateTimeZone)#%d (%d) {
54  ["timezone_type"]=>
55  int(1)
56  ["timezone"]=>
57  string(6) "+01:30"
58}
59