Test: /ext/date/tests/date_create_variation1.phpt - Version 7.1.25    

There is 1 diff reported by users for this test.

Count Diff
1 (100%)
001+ sh: 1: /home/ubuntu/php-7.1.25/sapi/cli/php: Permission denied
001- *** Testing date_create() : usage variation - unexpected values to first argument $time***
002-
003- -- int 0 --
004- bool(false)
005- bool(false)
006-
007- -- int 1 --
008- bool(false)
009- bool(false)
010-
011- -- int 12345 --
012- bool(false)
013- bool(false)
014-
015- -- int -12345 --
016- bool(false)
017- bool(false)
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- bool(false)
039- bool(false)
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-
061- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
062- bool(false)
063-
064- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
065- bool(false)
066-
067- -- int indexed array --
068-
069- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
070- bool(false)
071-
072- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
073- bool(false)
074-
075- -- associative array --
076-
077- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
078- bool(false)
079-
080- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
081- bool(false)
082-
083- -- nested arrays --
084-
085- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
086- bool(false)
087-
088- Warning: date_create() expects parameter 1 to be string, array given in %s on line %d
089- bool(false)
090-
091- -- uppercase NULL --
092- object(DateTime)#%d (3) {
093- ["date"]=>
094- string(26) "%s"
095- ["timezone_type"]=>
096- int(3)
097- ["timezone"]=>
098- string(13) "Europe/London"
099- }
100- object(DateTime)#%d (3) {
101- ["date"]=>
102- string(26) "%s"
103- ["timezone_type"]=>
104- int(3)
105- ["timezone"]=>
106- string(13) "Europe/London"
107- }
108-
109- -- lowercase null --
110- object(DateTime)#%d (3) {
111- ["date"]=>
112- string(26) "%s"
113- ["timezone_type"]=>
114- int(3)
115- ["timezone"]=>
116- string(13) "Europe/London"
117- }
118- object(DateTime)#%d (3) {
119- ["date"]=>
120- string(26) "%s"
121- ["timezone_type"]=>
122- int(3)
123- ["timezone"]=>
124- string(13) "Europe/London"
125- }
126-
127- -- lowercase true --
128- bool(false)
129- bool(false)
130-
131- -- lowercase false --
132- object(DateTime)#%d (3) {
133- ["date"]=>
134- string(26) "%s"
135- ["timezone_type"]=>
136- int(3)
137- ["timezone"]=>
138- string(13) "Europe/London"
139- }
140- object(DateTime)#%d (3) {
141- ["date"]=>
142- string(26) "%s"
143- ["timezone_type"]=>
144- int(3)
145- ["timezone"]=>
146- string(13) "Europe/London"
147- }
148-
149- -- uppercase TRUE --
150- bool(false)
151- bool(false)
152-
153- -- uppercase FALSE --
154- object(DateTime)#%d (3) {
155- ["date"]=>
156- string(26) "%s"
157- ["timezone_type"]=>
158- int(3)
159- ["timezone"]=>
160- string(13) "Europe/London"
161- }
162- object(DateTime)#%d (3) {
163- ["date"]=>
164- string(26) "%s"
165- ["timezone_type"]=>
166- int(3)
167- ["timezone"]=>
168- string(13) "Europe/London"
169- }
170-
171- -- empty string DQ --
172- object(DateTime)#%d (3) {
173- ["date"]=>
174- string(26) "%s"
175- ["timezone_type"]=>
176- int(3)
177- ["timezone"]=>
178- string(13) "Europe/London"
179- }
180- object(DateTime)#%d (3) {
181- ["date"]=>
182- string(26) "%s"
183- ["timezone_type"]=>
184- int(3)
185- ["timezone"]=>
186- string(13) "Europe/London"
187- }
188-
189- -- empty string SQ --
190- object(DateTime)#%d (3) {
191- ["date"]=>
192- string(26) "%s"
193- ["timezone_type"]=>
194- int(3)
195- ["timezone"]=>
196- string(13) "Europe/London"
197- }
198- object(DateTime)#%d (3) {
199- ["date"]=>
200- string(26) "%s"
201- ["timezone_type"]=>
202- int(3)
203- ["timezone"]=>
204- string(13) "Europe/London"
205- }
206-
207- -- string DQ --
208- bool(false)
209- bool(false)
210-
211- -- string SQ --
212- bool(false)
213- bool(false)
214-
215- -- mixed case string --
216- bool(false)
217- bool(false)
218-
219- -- heredoc --
220- bool(false)
221- bool(false)
222-
223- -- instance of classWithToString --
224- bool(false)
225- bool(false)
226-
227- -- instance of classWithoutToString --
228-
229- Warning: date_create() expects parameter 1 to be string, object given in %s on line %d
230- bool(false)
231-
232- Warning: date_create() expects parameter 1 to be string, object given in %s on line %d
233- bool(false)
234-
235- -- undefined var --
236- object(DateTime)#%d (3) {
237- ["date"]=>
238- string(26) "%s"
239- ["timezone_type"]=>
240- int(3)
241- ["timezone"]=>
242- string(13) "Europe/London"
243- }
244- object(DateTime)#%d (3) {
245- ["date"]=>
246- string(26) "%s"
247- ["timezone_type"]=>
248- int(3)
249- ["timezone"]=>
250- string(13) "Europe/London"
251- }
252-
253- -- unset var --
254- object(DateTime)#%d (3) {
255- ["date"]=>
256- string(26) "%s"
257- ["timezone_type"]=>
258- int(3)
259- ["timezone"]=>
260- string(13) "Europe/London"
261- }
262- object(DateTime)#%d (3) {
263- ["date"]=>
264- string(26) "%s"
265- ["timezone_type"]=>
266- int(3)
267- ["timezone"]=>
268- string(13) "Europe/London"
269- }
270-
271- -- resource --
272-
273- Warning: date_create() expects parameter 1 to be string, resource given in %s on line %d
274- bool(false)
275-
276- Warning: date_create() expects parameter 1 to be string, resource given in %s on line %d
277- bool(false)
278- ===DONE===