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===DONE=== 30--EXPECTF-- 31*** Testing clone on DateTime objects *** 32object(DateTimeZone)#%d (2) { 33 ["timezone_type"]=> 34 int(2) 35 ["timezone"]=> 36 string(3) "GMT" 37} 38object(DateTimeZone)#%d (2) { 39 ["timezone_type"]=> 40 int(2) 41 ["timezone"]=> 42 string(3) "GMT" 43} 44TEST PASSED : Objects equal but not indetical 45===DONE=== 46