Skip to content

Commit 1215408

Browse files
committed
Amend array tests
1 parent 34ea841 commit 1215408

10 files changed

+65
-177
lines changed

ext/standard/tests/array/array_combine_variation4.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $arrays = array (
5252

5353
// array with mixed keys
5454
/*11*/ array('hello' => 1, "fruit" => 2.2,
55-
$fp => 'resource', 133 => "int", 444.432 => "float",
55+
$fp => 'resource', 133 => "int",
5656
@$unset_var => "unset", $heredoc => "heredoc")
5757
);
5858

@@ -81,8 +81,6 @@ echo "Done";
8181
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
8282

8383
Warning: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
84-
85-
Deprecated: Implicit conversion from non-compatible float 444.432 to int in %s on line %d
8684
-- Iteration 1 --
8785
array(0) {
8886
}
@@ -144,7 +142,7 @@ array(2) {
144142
string(8) "resource"
145143
}
146144
-- Iteration 9 --
147-
array(7) {
145+
array(6) {
148146
[1]=>
149147
int(1)
150148
["2.2"]=>
@@ -153,8 +151,6 @@ array(7) {
153151
string(8) "resource"
154152
["int"]=>
155153
string(3) "int"
156-
["float"]=>
157-
string(5) "float"
158154
["unset"]=>
159155
string(5) "unset"
160156
["heredoc"]=>

ext/standard/tests/array/array_fill.phpt

Lines changed: 32 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
basic array_fill test
33
--FILE--
44
<?php
5-
$array1 = array(0.0, 1, 2.5);
5+
$array1 = array(0.0, 1, 2);
66
$array2 = array(TRUE, FALSE, NULL, "d", "e", "f");
77
foreach($array1 as $start)
88
{
@@ -18,7 +18,7 @@ foreach($array1 as $start)
1818
}
1919
}
2020
?>
21-
--EXPECTF--
21+
--EXPECT--
2222
===========================
2323
bool(true)
2424
start: 0 num: 0 value: array(0) {
@@ -81,59 +81,47 @@ start: 0 num: 1 value: array(1) {
8181
}
8282
===========================
8383
bool(true)
84-
start: 0 num: 2.5 value:
85-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
86-
array(2) {
84+
start: 0 num: 2 value: array(2) {
8785
[0]=>
8886
bool(true)
8987
[1]=>
9088
bool(true)
9189
}
9290
===========================
9391
bool(false)
94-
start: 0 num: 2.5 value:
95-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
96-
array(2) {
92+
start: 0 num: 2 value: array(2) {
9793
[0]=>
9894
bool(false)
9995
[1]=>
10096
bool(false)
10197
}
10298
===========================
10399
NULL
104-
start: 0 num: 2.5 value:
105-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
106-
array(2) {
100+
start: 0 num: 2 value: array(2) {
107101
[0]=>
108102
NULL
109103
[1]=>
110104
NULL
111105
}
112106
===========================
113107
string(1) "d"
114-
start: 0 num: 2.5 value:
115-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
116-
array(2) {
108+
start: 0 num: 2 value: array(2) {
117109
[0]=>
118110
string(1) "d"
119111
[1]=>
120112
string(1) "d"
121113
}
122114
===========================
123115
string(1) "e"
124-
start: 0 num: 2.5 value:
125-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
126-
array(2) {
116+
start: 0 num: 2 value: array(2) {
127117
[0]=>
128118
string(1) "e"
129119
[1]=>
130120
string(1) "e"
131121
}
132122
===========================
133123
string(1) "f"
134-
start: 0 num: 2.5 value:
135-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
136-
array(2) {
124+
start: 0 num: 2 value: array(2) {
137125
[0]=>
138126
string(1) "f"
139127
[1]=>
@@ -201,215 +189,155 @@ start: 1 num: 1 value: array(1) {
201189
}
202190
===========================
203191
bool(true)
204-
start: 1 num: 2.5 value:
205-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
206-
array(2) {
192+
start: 1 num: 2 value: array(2) {
207193
[1]=>
208194
bool(true)
209195
[2]=>
210196
bool(true)
211197
}
212198
===========================
213199
bool(false)
214-
start: 1 num: 2.5 value:
215-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
216-
array(2) {
200+
start: 1 num: 2 value: array(2) {
217201
[1]=>
218202
bool(false)
219203
[2]=>
220204
bool(false)
221205
}
222206
===========================
223207
NULL
224-
start: 1 num: 2.5 value:
225-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
226-
array(2) {
208+
start: 1 num: 2 value: array(2) {
227209
[1]=>
228210
NULL
229211
[2]=>
230212
NULL
231213
}
232214
===========================
233215
string(1) "d"
234-
start: 1 num: 2.5 value:
235-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
236-
array(2) {
216+
start: 1 num: 2 value: array(2) {
237217
[1]=>
238218
string(1) "d"
239219
[2]=>
240220
string(1) "d"
241221
}
242222
===========================
243223
string(1) "e"
244-
start: 1 num: 2.5 value:
245-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
246-
array(2) {
224+
start: 1 num: 2 value: array(2) {
247225
[1]=>
248226
string(1) "e"
249227
[2]=>
250228
string(1) "e"
251229
}
252230
===========================
253231
string(1) "f"
254-
start: 1 num: 2.5 value:
255-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
256-
array(2) {
232+
start: 1 num: 2 value: array(2) {
257233
[1]=>
258234
string(1) "f"
259235
[2]=>
260236
string(1) "f"
261237
}
262238
===========================
263239
bool(true)
264-
start: 2.5 num: 0 value:
265-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
266-
array(0) {
240+
start: 2 num: 0 value: array(0) {
267241
}
268242
===========================
269243
bool(false)
270-
start: 2.5 num: 0 value:
271-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
272-
array(0) {
244+
start: 2 num: 0 value: array(0) {
273245
}
274246
===========================
275247
NULL
276-
start: 2.5 num: 0 value:
277-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
278-
array(0) {
248+
start: 2 num: 0 value: array(0) {
279249
}
280250
===========================
281251
string(1) "d"
282-
start: 2.5 num: 0 value:
283-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
284-
array(0) {
252+
start: 2 num: 0 value: array(0) {
285253
}
286254
===========================
287255
string(1) "e"
288-
start: 2.5 num: 0 value:
289-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
290-
array(0) {
256+
start: 2 num: 0 value: array(0) {
291257
}
292258
===========================
293259
string(1) "f"
294-
start: 2.5 num: 0 value:
295-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
296-
array(0) {
260+
start: 2 num: 0 value: array(0) {
297261
}
298262
===========================
299263
bool(true)
300-
start: 2.5 num: 1 value:
301-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
302-
array(1) {
264+
start: 2 num: 1 value: array(1) {
303265
[2]=>
304266
bool(true)
305267
}
306268
===========================
307269
bool(false)
308-
start: 2.5 num: 1 value:
309-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
310-
array(1) {
270+
start: 2 num: 1 value: array(1) {
311271
[2]=>
312272
bool(false)
313273
}
314274
===========================
315275
NULL
316-
start: 2.5 num: 1 value:
317-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
318-
array(1) {
276+
start: 2 num: 1 value: array(1) {
319277
[2]=>
320278
NULL
321279
}
322280
===========================
323281
string(1) "d"
324-
start: 2.5 num: 1 value:
325-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
326-
array(1) {
282+
start: 2 num: 1 value: array(1) {
327283
[2]=>
328284
string(1) "d"
329285
}
330286
===========================
331287
string(1) "e"
332-
start: 2.5 num: 1 value:
333-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
334-
array(1) {
288+
start: 2 num: 1 value: array(1) {
335289
[2]=>
336290
string(1) "e"
337291
}
338292
===========================
339293
string(1) "f"
340-
start: 2.5 num: 1 value:
341-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
342-
array(1) {
294+
start: 2 num: 1 value: array(1) {
343295
[2]=>
344296
string(1) "f"
345297
}
346298
===========================
347299
bool(true)
348-
start: 2.5 num: 2.5 value:
349-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
350-
351-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
352-
array(2) {
300+
start: 2 num: 2 value: array(2) {
353301
[2]=>
354302
bool(true)
355303
[3]=>
356304
bool(true)
357305
}
358306
===========================
359307
bool(false)
360-
start: 2.5 num: 2.5 value:
361-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
362-
363-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
364-
array(2) {
308+
start: 2 num: 2 value: array(2) {
365309
[2]=>
366310
bool(false)
367311
[3]=>
368312
bool(false)
369313
}
370314
===========================
371315
NULL
372-
start: 2.5 num: 2.5 value:
373-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
374-
375-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
376-
array(2) {
316+
start: 2 num: 2 value: array(2) {
377317
[2]=>
378318
NULL
379319
[3]=>
380320
NULL
381321
}
382322
===========================
383323
string(1) "d"
384-
start: 2.5 num: 2.5 value:
385-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
386-
387-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
388-
array(2) {
324+
start: 2 num: 2 value: array(2) {
389325
[2]=>
390326
string(1) "d"
391327
[3]=>
392328
string(1) "d"
393329
}
394330
===========================
395331
string(1) "e"
396-
start: 2.5 num: 2.5 value:
397-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
398-
399-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
400-
array(2) {
332+
start: 2 num: 2 value: array(2) {
401333
[2]=>
402334
string(1) "e"
403335
[3]=>
404336
string(1) "e"
405337
}
406338
===========================
407339
string(1) "f"
408-
start: 2.5 num: 2.5 value:
409-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
410-
411-
Deprecated: Implicit conversion from non-compatible float 2.5 to int in %s on line %d
412-
array(2) {
340+
start: 2 num: 2 value: array(2) {
413341
[2]=>
414342
string(1) "f"
415343
[3]=>

ext/standard/tests/array/array_intersect_assoc_variation5.phpt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ $arrays = array (
4242

4343
// array with mixed keys
4444
/*11*/ array('hello' => 1, "fruit" => 2.2,
45-
133 => "int", 444.432 => "float",
45+
133 => "int",
4646
@$unset_var => "unset", $heredoc => "heredoc")
4747
);
4848

49-
// array to be passsed to $arr2 argument
49+
// array to be passed to $arr2 argument
5050
$arr2 = array(0 => 0, 2 => "float", 4 => "f3", 33333333 => "f4",
5151
"\tHello" => 111, 2.2, 'color', "Hello world" => "string",
5252
"pen\n" => 33, 133 => "int");
@@ -67,10 +67,8 @@ foreach($arrays as $arr1) {
6767

6868
echo "Done";
6969
?>
70-
--EXPECTF--
70+
--EXPECT--
7171
*** Testing array_intersect_assoc() : assoc array with diff keys to $arr1 argument ***
72-
73-
Deprecated: Implicit conversion from non-compatible float 444.432 to int in %s on line %d
7472
-- Iteration 1 --
7573
array(0) {
7674
}

0 commit comments

Comments
 (0)