summaryrefslogtreecommitdiff
path: root/ext/date/tests/008.phpt
blob: 9abdd447f7621ab62efdaf1ec42b3a1c2f34d73c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
--TEST--
getdate() tests
--INI--
date.timezone=UTC
--FILE--
<?php

$t = mktime(0,0,0, 6, 27, 2006);
var_dump(getdate(1,1));

var_dump(getdate($t));
var_dump(getdate());

echo "Done\n";
?>
--EXPECTF--	
Warning: getdate() expects at most 1 parameter, 2 given in %s on line %d
bool(false)
array(11) {
  ["seconds"]=>
  int(0)
  ["minutes"]=>
  int(0)
  ["hours"]=>
  int(0)
  ["mday"]=>
  int(27)
  ["wday"]=>
  int(2)
  ["mon"]=>
  int(6)
  ["year"]=>
  int(2006)
  ["yday"]=>
  int(177)
  ["weekday"]=>
  string(7) "Tuesday"
  ["month"]=>
  string(4) "June"
  [0]=>
  int(1151366400)
}
array(11) {
  ["seconds"]=>
  int(%d)
  ["minutes"]=>
  int(%d)
  ["hours"]=>
  int(%d)
  ["mday"]=>
  int(%d)
  ["wday"]=>
  int(%d)
  ["mon"]=>
  int(%d)
  ["year"]=>
  int(%d)
  ["yday"]=>
  int(%d)
  ["weekday"]=>
  string(%d) "%s"
  ["month"]=>
  string(%d) "%s"
  [0]=>
  int(%d)
}
Done
--UEXPECTF--
Warning: getdate() expects at most 1 parameter, 2 given in %s on line %d
bool(false)
array(11) {
  [u"seconds"]=>
  int(0)
  [u"minutes"]=>
  int(0)
  [u"hours"]=>
  int(0)
  [u"mday"]=>
  int(27)
  [u"wday"]=>
  int(2)
  [u"mon"]=>
  int(6)
  [u"year"]=>
  int(2006)
  [u"yday"]=>
  int(177)
  [u"weekday"]=>
  string(7) "Tuesday"
  [u"month"]=>
  string(4) "June"
  [0]=>
  int(1151366400)
}
array(11) {
  [u"seconds"]=>
  int(%d)
  [u"minutes"]=>
  int(%d)
  [u"hours"]=>
  int(%d)
  [u"mday"]=>
  int(%d)
  [u"wday"]=>
  int(%d)
  [u"mon"]=>
  int(%d)
  [u"year"]=>
  int(%d)
  [u"yday"]=>
  int(%d)
  [u"weekday"]=>
  string(%d) "%s"
  [u"month"]=>
  string(%d) "%s"
  [0]=>
  int(%d)
}
Done