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