Test: /ext/standard/tests/file/fgets_basic.phpt - Version 5.3.20-dev    

There is 1 diff reported by users for this test.

Count Diff
1 (100%)
021- string(22) "text text text text te"
022- int(22)
023- bool(false)
024- -- File content type : text_with_new_line --
025- -- fgets() with default length, file pointer at 0 --
026- string(5) "line
027- "
028- int(5)
029- bool(false)
030- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
031- bool(true)
032- string(5) "line
033- "
034- int(5)
035- bool(false)
036- -- File content type : alphanumeric --
037- -- fgets() with default length, file pointer at 0 --
038- string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
039- int(50)
040- bool(true)
041- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
042- bool(true)
043- string(22) "ab12 ab12 ab12 ab12 ab"
044- int(22)
045- bool(false)
046-
047- -- Testing fgets() with file opened using mode rb --
048- -- File content type : numeric --
049- -- fgets() with default length, file pointer at 0 --
050- string(50) "22222222222222222222222222222222222222222222222222"
051- int(50)
052- bool(true)
053- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
054- bool(true)
055- string(22) "2222222222222222222222"
056- int(22)
057- bool(false)
058- -- File content type : text --
059- -- fgets() with default length, file pointer at 0 --
060- string(50) "text text text text text text text text text text "
061- int(50)
062- bool(true)
063- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
064- bool(true)
065- string(22) "text text text text te"
066- int(22)
067- bool(false)
068- -- File content type : text_with_new_line --
069- -- fgets() with default length, file pointer at 0 --
070- string(5) "line
071- "
072- int(5)
073- bool(false)
074- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
075- bool(true)
076- string(5) "line
077- "
078- int(5)
079- bool(false)
080- -- File content type : alphanumeric --
081- -- fgets() with default length, file pointer at 0 --
082- string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
083- int(50)
084- bool(true)
085- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
086- bool(true)
087- string(22) "ab12 ab12 ab12 ab12 ab"
088- int(22)
089- bool(false)
090-
091- -- Testing fgets() with file opened using mode rt --
092- -- File content type : numeric --
093- -- fgets() with default length, file pointer at 0 --
094- string(50) "22222222222222222222222222222222222222222222222222"
095- int(50)
096- bool(true)
097- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
098- bool(true)
099- string(22) "2222222222222222222222"
100- int(22)
101- bool(false)
102- -- File content type : text --
103- -- fgets() with default length, file pointer at 0 --
104- string(50) "text text text text text text text text text text "
105- int(50)
106- bool(true)
107- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
108- bool(true)
109- string(22) "text text text text te"
110- int(22)
111- bool(false)
112- -- File content type : text_with_new_line --
113- -- fgets() with default length, file pointer at 0 --
114- string(5) "line
115- "
116- int(5)
117- bool(false)
118- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
119- bool(true)
120- string(5) "line
121- "
122- int(5)
123- bool(false)
124- -- File content type : alphanumeric --
125- -- fgets() with default length, file pointer at 0 --
126- string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
127- int(50)
128- bool(true)
129- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
130- bool(true)
131- string(22) "ab12 ab12 ab12 ab12 ab"
132- int(22)
133- bool(false)
134-
135- -- Testing fgets() with file opened using mode r+ --
136- -- File content type : numeric --
137- -- fgets() with default length, file pointer at 0 --
138- string(50) "22222222222222222222222222222222222222222222222222"
139- int(50)
140- bool(true)
141- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
142- bool(true)
143- string(22) "2222222222222222222222"
144- int(22)
145- bool(false)
146- -- File content type : text --
147- -- fgets() with default length, file pointer at 0 --
148- string(50) "text text text text text text text text text text "
149- int(50)
150- bool(true)
151- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
152- bool(true)
153- string(22) "text text text text te"
154- int(22)
155- bool(false)
156- -- File content type : text_with_new_line --
157- -- fgets() with default length, file pointer at 0 --
158- string(5) "line
159- "
160- int(5)
161- bool(false)
162- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
163- bool(true)
164- string(5) "line
165- "
166- int(5)
167- bool(false)
168- -- File content type : alphanumeric --
169- -- fgets() with default length, file pointer at 0 --
170- string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
171- int(50)
172- bool(true)
173- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
174- bool(true)
175- string(22) "ab12 ab12 ab12 ab12 ab"
176- int(22)
177- bool(false)
178-
179- -- Testing fgets() with file opened using mode r+b --
180- -- File content type : numeric --
181- -- fgets() with default length, file pointer at 0 --
182- string(50) "22222222222222222222222222222222222222222222222222"
183- int(50)
184- bool(true)
185- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
186- bool(true)
187- string(22) "2222222222222222222222"
188- int(22)
189- bool(false)
190- -- File content type : text --
191- -- fgets() with default length, file pointer at 0 --
192- string(50) "text text text text text text text text text text "
193- int(50)
194- bool(true)
195- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
196- bool(true)
197- string(22) "text text text text te"
198- int(22)
199- bool(false)
200- -- File content type : text_with_new_line --
201- -- fgets() with default length, file pointer at 0 --
202- string(5) "line
203- "
204- int(5)
205- bool(false)
206- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
207- bool(true)
208- string(5) "line
209- "
210- int(5)
211- bool(false)
212- -- File content type : alphanumeric --
213- -- fgets() with default length, file pointer at 0 --
214- string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
215- int(50)
216- bool(true)
217- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
218- bool(true)
219- string(22) "ab12 ab12 ab12 ab12 ab"
220- int(22)
221- bool(false)
222-
223- -- Testing fgets() with file opened using mode r+t --
224- -- File content type : numeric --
225- -- fgets() with default length, file pointer at 0 --
226- string(50) "22222222222222222222222222222222222222222222222222"
227- int(50)
228- bool(true)
229- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
230- bool(true)
231- string(22) "2222222222222222222222"
232- int(22)
233- bool(false)
234- -- File content type : text --
235- -- fgets() with default length, file pointer at 0 --
236- string(50) "text text text text text text text text text text "
237- int(50)
238- bool(true)
239- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
240- bool(true)
241- string(22) "text text text text te"
242- int(22)
243- bool(false)
244- -- File content type : text_with_new_line --
245- -- fgets() with default length, file pointer at 0 --
246- string(5) "line
247- "
248- int(5)
249- bool(false)
250- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
251- bool(true)
252- string(5) "line
253- "
254- int(5)
255- bool(false)
256- -- File content type : alphanumeric --
257- -- fgets() with default length, file pointer at 0 --
258- string(50) "ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 ab12 "
259- int(50)
260- bool(true)
261- -- fgets() with length = 23, Expected: 22 chars, file pointer at 0 --
262- bool(true)
263- string(22) "ab12 ab12 ab12 ab12 ab"
264- int(22)
265- bool(false)
266- Done