@@ -132,6 +132,93 @@ OUTPUT;
132
132
133
133
$ EXPECTED_OUTPUT_FLOAT_OFFSETS_REGEX = '/^ ' . expectf_to_regex (EXPECTF_OUTPUT_FLOAT_OFFSETS ) . '$/s ' ;
134
134
135
+ const EXPECTED_OUTPUT_NULL_OFFSETS = <<<OUTPUT
136
+ Read before write:
137
+
138
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
139
+
140
+ Warning: Undefined array key "" in %s on line %d
141
+ NULL
142
+ Write:
143
+
144
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
145
+ Read:
146
+
147
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
148
+ int(5)
149
+ Read-Write:
150
+
151
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
152
+
153
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
154
+ isset():
155
+
156
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
157
+ bool(true)
158
+ empty():
159
+
160
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
161
+ bool(false)
162
+ null coalesce:
163
+
164
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
165
+ int(25)
166
+ Reference to dimension:
167
+
168
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
169
+ Value of reference:
170
+ int(25)
171
+ Value of container dimension after write to reference (should be int(100) if successful):
172
+
173
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
174
+ int(100)
175
+ unset():
176
+
177
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
178
+ Nested read:
179
+
180
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
181
+
182
+ Warning: Undefined array key "" in %s on line %d
183
+
184
+ Warning: Trying to access array offset on null in %s on line %d
185
+ NULL
186
+ Nested write:
187
+
188
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
189
+
190
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
191
+ Nested Read-Write:
192
+
193
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
194
+
195
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
196
+ Nested isset():
197
+
198
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
199
+
200
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
201
+ bool(true)
202
+ Nested empty():
203
+
204
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
205
+
206
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
207
+ bool(false)
208
+ Nested null coalesce:
209
+
210
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
211
+
212
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
213
+ int(30)
214
+ Nested unset():
215
+
216
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line %d
217
+
218
+ OUTPUT ;
219
+
220
+ $ EXPECTED_OUTPUT_NULL_OFFSETS_REGEX = '/^ ' . expectf_to_regex (EXPECTED_OUTPUT_NULL_OFFSETS ) . '$/s ' ;
221
+
135
222
const EXPECTED_OUTPUT_INVALID_OFFSETS = <<<OUTPUT
136
223
Read before write:
137
224
Cannot access offset of type %s on ArrayObject
@@ -175,44 +262,86 @@ $EXPECTED_OUTPUT_INVALID_OFFSETS_REGEX = '/^' . expectf_to_regex(EXPECTED_OUTPUT
175
262
const EXPECTED_OUTPUT_NULL_OFFSET = <<<OUTPUT
176
263
Read before write:
177
264
265
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 8
266
+
178
267
Warning: Undefined array key "" in %s on line 8
179
268
NULL
180
269
Write:
181
270
Read:
182
271
272
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 22
273
+
183
274
Warning: Undefined array key "" in %s on line 22
184
275
NULL
185
276
Read-Write:
186
277
278
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 29
279
+
187
280
Warning: Undefined array key "" in %s on line 29
188
281
isset():
282
+
283
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 36
189
284
bool(false)
190
285
empty():
286
+
287
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 42
191
288
bool(true)
192
289
null coalesce:
290
+
291
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 48
193
292
string(7) "default"
194
293
Reference to dimension:
294
+
295
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 55
195
296
Value of reference:
196
297
NULL
197
298
Value of container dimension after write to reference (should be int(100) if successful):
299
+
300
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 60
198
301
int(100)
199
302
unset():
303
+
304
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 67
200
305
Nested read:
201
306
307
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 74
308
+
202
309
Warning: Undefined array key "" in %s on line 74
203
310
204
311
Warning: Trying to access array offset on null in %s on line 74
205
312
NULL
206
313
Nested write:
314
+
315
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 81
316
+
317
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 81
207
318
Nested Read-Write:
319
+
320
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 88
321
+
322
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 88
208
323
Nested isset():
324
+
325
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 95
326
+
327
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 95
209
328
bool(true)
210
329
Nested empty():
330
+
331
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 101
332
+
333
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 101
211
334
bool(false)
212
335
Nested null coalesce:
336
+
337
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 107
338
+
339
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 107
213
340
int(30)
214
341
Nested unset():
215
342
343
+ Deprecated: Using null as an array offset is deprecated, use an empty string instead in %s on line 114
344
+
216
345
OUTPUT ;
217
346
218
347
const EXPECTED_OUTPUT_RESOURCE_STDERR_OFFSETS = <<<OUTPUT
@@ -323,6 +452,7 @@ foreach ($offsets as $dimension) {
323
452
!preg_match ($ EXPECTED_OUTPUT_VALID_OFFSETS_REGEX , $ varOutput )
324
453
&& !preg_match ($ EXPECTED_OUTPUT_INVALID_OFFSETS_REGEX , $ varOutput )
325
454
&& !preg_match ($ EXPECTED_OUTPUT_FLOAT_OFFSETS_REGEX , $ varOutput )
455
+ && !preg_match ($ EXPECTED_OUTPUT_NULL_OFFSETS_REGEX , $ varOutput )
326
456
&& $ varOutput !== EXPECTED_OUTPUT_NULL_OFFSET
327
457
&& $ varOutput !== EXPECTED_OUTPUT_RESOURCE_STDERR_OFFSETS
328
458
) {
@@ -354,6 +484,7 @@ foreach ($offsets as $offset) {
354
484
!preg_match ($ EXPECTED_OUTPUT_VALID_OFFSETS_REGEX , $ varOutput )
355
485
&& !preg_match ($ EXPECTED_OUTPUT_INVALID_OFFSETS_REGEX , $ varOutput )
356
486
&& !preg_match ($ EXPECTED_OUTPUT_FLOAT_OFFSETS_REGEX , $ varOutput )
487
+ && !preg_match ($ EXPECTED_OUTPUT_NULL_OFFSETS_REGEX , $ varOutput )
357
488
&& $ varOutput !== EXPECTED_OUTPUT_NULL_OFFSET
358
489
&& $ varOutput !== EXPECTED_OUTPUT_RESOURCE_STDERR_OFFSETS
359
490
) {
0 commit comments