1--TEST--
2Test date_parse() function : basic functionality
3--FILE--
4<?php
5//Set the default time zone
6date_default_timezone_set("Europe/London");
7
8echo "*** Testing date_parse() : basic functionality ***\n";
9
10var_dump( date_parse("2009-02-27 10:00:00.5") );
11var_dump( date_parse("10:00:00.5") );
12var_dump( date_parse("2009-02-27") );
13
14?>
15--EXPECT--
16*** Testing date_parse() : basic functionality ***
17array(12) {
18  ["year"]=>
19  int(2009)
20  ["month"]=>
21  int(2)
22  ["day"]=>
23  int(27)
24  ["hour"]=>
25  int(10)
26  ["minute"]=>
27  int(0)
28  ["second"]=>
29  int(0)
30  ["fraction"]=>
31  float(0.5)
32  ["warning_count"]=>
33  int(0)
34  ["warnings"]=>
35  array(0) {
36  }
37  ["error_count"]=>
38  int(0)
39  ["errors"]=>
40  array(0) {
41  }
42  ["is_localtime"]=>
43  bool(false)
44}
45array(12) {
46  ["year"]=>
47  bool(false)
48  ["month"]=>
49  bool(false)
50  ["day"]=>
51  bool(false)
52  ["hour"]=>
53  int(10)
54  ["minute"]=>
55  int(0)
56  ["second"]=>
57  int(0)
58  ["fraction"]=>
59  float(0.5)
60  ["warning_count"]=>
61  int(0)
62  ["warnings"]=>
63  array(0) {
64  }
65  ["error_count"]=>
66  int(0)
67  ["errors"]=>
68  array(0) {
69  }
70  ["is_localtime"]=>
71  bool(false)
72}
73array(12) {
74  ["year"]=>
75  int(2009)
76  ["month"]=>
77  int(2)
78  ["day"]=>
79  int(27)
80  ["hour"]=>
81  bool(false)
82  ["minute"]=>
83  bool(false)
84  ["second"]=>
85  bool(false)
86  ["fraction"]=>
87  bool(false)
88  ["warning_count"]=>
89  int(0)
90  ["warnings"]=>
91  array(0) {
92  }
93  ["error_count"]=>
94  int(0)
95  ["errors"]=>
96  array(0) {
97  }
98  ["is_localtime"]=>
99  bool(false)
100}
101