1--TEST--
2Test clone on DateTimeZone objects
3--FILE--
4<?php
5
6//Set the default time zone
7date_default_timezone_set('Europe/London');
8
9echo "*** Testing clone on DateTime objects ***\n";
10
11// Create a DateTimeZone object..
12$orig =  new DateTimeZone("GMT");
13
14// ..create a clone of it ..Clone
15$clone = clone $orig;
16
17var_dump($orig);
18var_dump($clone);
19
20if ($clone != $orig) {
21    echo "TEST FAILED : objects not equal\n";
22}else if ($clone === $orig) {
23    echo "TEST FAILED : objects identical\n";
24} else {
25    echo "TEST PASSED : Objects equal but not indetical\n";
26}
27
28?>
29--EXPECTF--
30*** Testing clone on DateTime objects ***
31object(DateTimeZone)#%d (2) {
32  ["timezone_type"]=>
33  int(2)
34  ["timezone"]=>
35  string(3) "GMT"
36}
37object(DateTimeZone)#%d (2) {
38  ["timezone_type"]=>
39  int(2)
40  ["timezone"]=>
41  string(3) "GMT"
42}
43TEST PASSED : Objects equal but not indetical
44