Annotation of embedaddon/php/ext/date/tests/DateTime_clone_basic1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test clone on DateTime objects
3: --FILE--
4: <?php
5:
6: //Set the default time zone
7: date_default_timezone_set('Europe/London');
8:
9: echo "*** 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:
20: echo "Original: " . $orig->format("H:i:s") . "\n";
21: echo "Clone: " . $clone->format("H:i:s") . "\n";
22:
23: ?>
24: ===DONE===
25: --EXPECTF--
26: *** Testing clone on DateTime objects ***
27: Original: 22:41:50
28: Clone: 14:25:41
29: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>