1--TEST--
2Test __set_state magic method for recreating a DateTimeZone object
3--CREDITS--
4Mark Baker mark@lange.demon.co.uk at the PHPNW2017 Conference for PHP Testfest 2017
5--FILE--
6<?php
7
8$datetimezoneObject = new DateTimezone('UTC');
9
10$datetimezoneState = var_export($datetimezoneObject, true);
11
12eval("\$datetimezoneObjectNew = {$datetimezoneState};");
13
14var_dump($datetimezoneObjectNew);
15
16?>
17--EXPECTF--
18object(DateTimeZone)#%d (2) {
19  ["timezone_type"]=>
20  int(3)
21  ["timezone"]=>
22  string(3) "UTC"
23}
24