Test: /ext/date/tests/DateTime_construct_variation1.phpt - Version 5.6.14-dev    

There is 1 diff reported by users for this test.

Count Diff
1 (100%)
004- FAILED: DateTime::__construct(): Failed to parse time string (0) at position 0 (0): Unexpected character
005- FAILED: DateTime::__construct(): Failed to parse time string (0) at position 0 (0): Unexpected character
006-
007- -- int 1 --
008- FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
009- FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
010-
011- -- int 12345 --
012- FAILED: DateTime::__construct(): Failed to parse time string (12345) at position 4 (5): Unexpected character
013- FAILED: DateTime::__construct(): Failed to parse time string (12345) at position 4 (5): Unexpected character
014-
015- -- int -12345 --
016- FAILED: DateTime::__construct(): Failed to parse time string (-12345) at position 5 (5): Unexpected character
017- FAILED: DateTime::__construct(): Failed to parse time string (-12345) at position 5 (5): Unexpected character
018-
019- -- float 10.5 --
020- object(DateTime)#%d (3) {
021- ["date"]=>
022- string(26) "%s"
023- ["timezone_type"]=>
024- int(3)
025- ["timezone"]=>
026- string(13) "Europe/London"
027- }
028- object(DateTime)#%d (3) {
029- ["date"]=>
030- string(26) "%s"
031- ["timezone_type"]=>
032- int(3)
033- ["timezone"]=>
034- string(13) "Europe/London"
035- }
036-
037- -- float -10.5 --
038- FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character
039- FAILED: DateTime::__construct(): Failed to parse time string (-10.5) at position 4 (5): Unexpected character
040-
041- -- float .5 --
042- object(DateTime)#%d (3) {
043- ["date"]=>
044- string(26) "%s"
045- ["timezone_type"]=>
046- int(3)
047- ["timezone"]=>
048- string(13) "Europe/London"
049- }
050- object(DateTime)#%d (3) {
051- ["date"]=>
052- string(26) "%s"
053- ["timezone_type"]=>
054- int(3)
055- ["timezone"]=>
056- string(13) "Europe/London"
057- }
058-
059- -- empty array --
060- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
061- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
062-
063- -- int indexed array --
064- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
065- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
066-
067- -- associative array --
068- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
069- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
070-
071- -- nested arrays --
072- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
073- FAILED: DateTime::__construct() expects parameter 1 to be string, array given
074-
075- -- uppercase NULL --
076- object(DateTime)#%d (3) {
077- ["date"]=>
078- string(26) "%s"
079- ["timezone_type"]=>
080- int(3)
081- ["timezone"]=>
082- string(13) "Europe/London"
083- }
084- object(DateTime)#%d (3) {
085- ["date"]=>
086- string(26) "%s"
087- ["timezone_type"]=>
088- int(3)
089- ["timezone"]=>
090- string(13) "Europe/London"
091- }
092-
093- -- lowercase null --
094- object(DateTime)#%d (3) {
095- ["date"]=>
096- string(26) "%s"
097- ["timezone_type"]=>
098- int(3)
099- ["timezone"]=>
100- string(13) "Europe/London"
101- }
102- object(DateTime)#%d (3) {
103- ["date"]=>
104- string(26) "%s"
105- ["timezone_type"]=>
106- int(3)
107- ["timezone"]=>
108- string(13) "Europe/London"
109- }
110-
111- -- lowercase true --
112- FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
113- FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
114-
115- -- lowercase false --
116- object(DateTime)#%d (3) {
117- ["date"]=>
118- string(26) "%s"
119- ["timezone_type"]=>
120- int(3)
121- ["timezone"]=>
122- string(13) "Europe/London"
123- }
124- object(DateTime)#%d (3) {
125- ["date"]=>
126- string(26) "%s"
127- ["timezone_type"]=>
128- int(3)
129- ["timezone"]=>
130- string(13) "Europe/London"
131- }
132-
133- -- uppercase TRUE --
134- FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
135- FAILED: DateTime::__construct(): Failed to parse time string (1) at position 0 (1): Unexpected character
136-
137- -- uppercase FALSE --
138- object(DateTime)#%d (3) {
139- ["date"]=>
140- string(26) "%s"
141- ["timezone_type"]=>
142- int(3)
143- ["timezone"]=>
144- string(13) "Europe/London"
145- }
146- object(DateTime)#%d (3) {
147- ["date"]=>
148- string(26) "%s"
149- ["timezone_type"]=>
150- int(3)
151- ["timezone"]=>
152- string(13) "Europe/London"
153- }
154-
155- -- empty string DQ --
156- object(DateTime)#%d (3) {
157- ["date"]=>
158- string(26) "%s"
159- ["timezone_type"]=>
160- int(3)
161- ["timezone"]=>
162- string(13) "Europe/London"
163- }
164- object(DateTime)#%d (3) {
165- ["date"]=>
166- string(26) "%s"
167- ["timezone_type"]=>
168- int(3)
169- ["timezone"]=>
170- string(13) "Europe/London"
171- }
172-
173- -- empty string SQ --
174- object(DateTime)#%d (3) {
175- ["date"]=>
176- string(26) "%s"
177- ["timezone_type"]=>
178- int(3)
179- ["timezone"]=>
180- string(13) "Europe/London"
181- }
182- object(DateTime)#%d (3) {
183- ["date"]=>
184- string(26) "%s"
185- ["timezone_type"]=>
186- int(3)
187- ["timezone"]=>
188- string(13) "Europe/London"
189- }
190-
191- -- string DQ --
192- FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
193- FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
194-
195- -- string SQ --
196- FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
197- FAILED: DateTime::__construct(): Failed to parse time string (string) at position 0 (s): The timezone could not be found in the database
198-
199- -- mixed case string --
200- FAILED: DateTime::__construct(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database
201- FAILED: DateTime::__construct(): Failed to parse time string (sTrInG) at position 0 (s): The timezone could not be found in the database
202-
203- -- heredoc --
204- FAILED: DateTime::__construct(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database
205- FAILED: DateTime::__construct(): Failed to parse time string (hello world) at position 0 (h): The timezone could not be found in the database
206-
207- -- instance of classWithToString --
208- FAILED: DateTime::__construct(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database
209- FAILED: DateTime::__construct(): Failed to parse time string (Class A object) at position 0 (C): The timezone could not be found in the database
210-
211- -- instance of classWithoutToString --
212- FAILED: DateTime::__construct() expects parameter 1 to be string, object given
213- FAILED: DateTime::__construct() expects parameter 1 to be string, object given
214-
215- -- undefined var --
216- object(DateTime)#%d (3) {
217- ["date"]=>
218- string(26) "%s"
219- ["timezone_type"]=>
220- int(3)
221- ["timezone"]=>
222- string(13) "Europe/London"
223- }
224- object(DateTime)#%d (3) {
225- ["date"]=>
226- string(26) "%s"
227- ["timezone_type"]=>
228- int(3)
229- ["timezone"]=>
230- string(13) "Europe/London"
231- }
232-
233- -- unset var --
234- object(DateTime)#%d (3) {
235- ["date"]=>
236- string(26) "%s"
237- ["timezone_type"]=>
238- int(3)
239- ["timezone"]=>
240- string(13) "Europe/London"
241- }
242- object(DateTime)#%d (3) {
243- ["date"]=>
244- string(26) "%s"
245- ["timezone_type"]=>
246- int(3)
247- ["timezone"]=>
248- string(13) "Europe/London"
249- }
250-
251- -- resource --
252- FAILED: DateTime::__construct() expects parameter 1 to be string, resource given
253- FAILED: DateTime::__construct() expects parameter 1 to be string, resource given
254- ===DONE===