@@ -23,17 +23,34 @@ bool(false)
23
23
null coalesce:
24
24
int(25)
25
25
unset():
26
+ Nested read:
27
+
28
+ Warning: Undefined array key %s in %s on line 62
29
+
30
+ Warning: Trying to access array offset on null in %s on line 62
31
+ NULL
32
+ Nested write:
33
+ Nested Read-Write:
34
+ Nested isset():
35
+ bool(true)
36
+ Nested empty():
37
+ bool(false)
38
+ Nested null coalesce:
39
+ int(30)
40
+ Nested unset():
26
41
27
42
OUTPUT ;
28
43
44
+ $ EXPECTED_OUTPUT_VALID_OFFSETS_REGEX = '/^ ' . expectf_to_regex (EXPECTED_OUTPUT_VALID_OFFSETS ) . '$/s ' ;
45
+
29
46
const EXPECTF_OUTPUT_FLOAT_OFFSETS = <<<OUTPUT
30
47
Read before write:
31
48
32
49
Warning: Trying to access array offset on false in %s on line 8
33
50
NULL
34
51
Write:
35
52
36
- Deprecated: Automatic conversion of false to array is deprecated %s on line 15
53
+ Deprecated: Automatic conversion of false to array is deprecated in %s on line 15
37
54
38
55
Deprecated: Implicit conversion from float %F to int loses precision in %s on line 15
39
56
Read:
@@ -58,6 +75,47 @@ int(25)
58
75
unset():
59
76
60
77
Deprecated: Implicit conversion from float %F to int loses precision in %s on line 55
78
+ Nested read:
79
+
80
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 62
81
+
82
+ Warning: Undefined array key 0 in %s on line 62
83
+
84
+ Warning: Trying to access array offset on null in %s on line 62
85
+ NULL
86
+ Nested write:
87
+
88
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 69
89
+
90
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 69
91
+ Nested Read-Write:
92
+
93
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 76
94
+
95
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 76
96
+ Nested isset():
97
+
98
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 83
99
+
100
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 83
101
+ bool(true)
102
+ Nested empty():
103
+
104
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 89
105
+
106
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 89
107
+ bool(false)
108
+ Nested null coalesce:
109
+
110
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 95
111
+
112
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 95
113
+ int(30)
114
+ Nested unset():
115
+
116
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 102
117
+
118
+ Deprecated: Implicit conversion from float %F to int loses precision in %s on line 102
61
119
62
120
OUTPUT ;
63
121
@@ -70,7 +128,7 @@ Warning: Trying to access array offset on false in %s on line 8
70
128
NULL
71
129
Write:
72
130
73
- Deprecated: Automatic conversion of false to array is deprecated %s on line 15
131
+ Deprecated: Automatic conversion of false to array is deprecated in %s on line 15
74
132
Cannot access offset of type %s on array
75
133
Read:
76
134
Cannot access offset of type %s on array
@@ -84,6 +142,20 @@ null coalesce:
84
142
Cannot access offset of type %s on array
85
143
unset():
86
144
Cannot unset offset of type %s on array
145
+ Nested read:
146
+ Cannot access offset of type %s on array
147
+ Nested write:
148
+ Cannot access offset of type %s on array
149
+ Nested Read-Write:
150
+ Cannot access offset of type %s on array
151
+ Nested isset():
152
+ Cannot access offset of type %s on array
153
+ Nested empty():
154
+ Cannot access offset of type %s on array
155
+ Nested null coalesce:
156
+ Cannot access offset of type %s on array
157
+ Nested unset():
158
+ Cannot access offset of type %s on array
87
159
88
160
OUTPUT ;
89
161
@@ -121,6 +193,47 @@ int(25)
121
193
unset():
122
194
123
195
Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 55
196
+ Nested read:
197
+
198
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 62
199
+
200
+ Warning: Undefined array key 3 in %s on line 62
201
+
202
+ Warning: Trying to access array offset on null in %s on line 62
203
+ NULL
204
+ Nested write:
205
+
206
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 69
207
+
208
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 69
209
+ Nested Read-Write:
210
+
211
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 76
212
+
213
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 76
214
+ Nested isset():
215
+
216
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 83
217
+
218
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 83
219
+ bool(true)
220
+ Nested empty():
221
+
222
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 89
223
+
224
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 89
225
+ bool(false)
226
+ Nested null coalesce:
227
+
228
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 95
229
+
230
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 95
231
+ int(30)
232
+ Nested unset():
233
+
234
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 102
235
+
236
+ Warning: Resource ID#3 used as offset, casting to integer (3) in %s on line 102
124
237
125
238
OUTPUT ;
126
239
@@ -139,7 +252,7 @@ foreach ($offsets as $dimension) {
139
252
);
140
253
141
254
if (
142
- $ varOutput !== EXPECTED_OUTPUT_VALID_OFFSETS
255
+ ! preg_match ( $ EXPECTED_OUTPUT_VALID_OFFSETS_REGEX , $ varOutput )
143
256
&& !preg_match ($ EXPECTED_OUTPUT_INVALID_OFFSETS_REGEX , $ varOutput )
144
257
&& !preg_match ($ EXPECTED_OUTPUT_FLOAT_OFFSETS_REGEX , $ varOutput )
145
258
&& $ varOutput !== EXPECTED_OUTPUT_RESOURCE_STDERR_OFFSETS
0 commit comments