1--TEST--
2Test clone on DateTime 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 DateTime object..
12$orig = new DateTime('2008-07-02 14:25:41');
13
14// ..create a clone of it ..Clone
15$clone = clone $orig;
16
17// ..and modify original
18$orig->setTime(22, 41, 50);
19
20echo "Original: " . $orig->format("H:i:s") . "\n";
21echo "Clone: " . $clone->format("H:i:s") . "\n";
22
23?>
24===DONE===
25--EXPECTF--
26*** Testing clone on DateTime objects ***
27Original: 22:41:50
28Clone: 14:25:41
29===DONE===
30