1--TEST--
2Test fgetcsv() : usage variations - with different delimiter but same enclosure
3--FILE--
4<?php
5/*
6 Description: Gets line from file pointer and parse for CSV fields
7*/
8
9/*
10   Testing fgetcsv() to read from a file when the delimiter argument value is not
11   present in the line being read by the fgetcsv()
12*/
13
14echo "*** Testing fgetcsv() : with different delimiter but same enclosure ***\n";
15
16/* the array is with three elements in it. Each element should be read as
17   1st element is delimiter, 2nd element is enclosure
18   and 3rd element is csv fields
19*/
20$csv_lists = array (
21  array(',', '"', '"water",fruit'),
22  array(',', '"', '"water","fruit"'),
23  array(' ', '^', '^water^ ^fruit^'),
24  array(':', '&', '&water&:&fruit&'),
25  array('=', '=', '=water===fruit='),
26  array('-', '-', '-water--fruit-air'),
27  array('-', '-', '-water---fruit---air-'),
28  array(':', '&', '&""""&:&"&:,:":&,&:,,,,')
29);
30
31$filename = __DIR__ . '/fgetcsv_variation9.tmp';
32@unlink($filename);
33
34$file_modes = array ("r","rb", "rt", "r+", "r+b", "r+t",
35                     "a+", "a+b", "a+t",
36                     "w+", "w+b", "w+t",
37                     "x+", "x+b", "x+t");
38
39$loop_counter = 1;
40foreach ($csv_lists as $csv_list) {
41  for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
42    // create the file and add the content with has csv fields
43    if ( strstr($file_modes[$mode_counter], "r") ) {
44      $file_handle = fopen($filename, "w");
45    } else {
46      $file_handle = fopen($filename, $file_modes[$mode_counter] );
47    }
48    if ( !$file_handle ) {
49      echo "Error: failed to create file $filename!\n";
50      exit();
51    }
52    $delimiter = $csv_list[0];
53    $enclosure = $csv_list[1];
54    $csv_field = $csv_list[2];
55    fwrite($file_handle, $csv_field . "\n");
56    // write another line of text and a blank line
57    // this will be used to test, if the fgetcsv() read more than a line and its
58    // working when only a blan line is read
59    fwrite($file_handle, "This is line of text without csv fields\n");
60    fwrite($file_handle, "\n"); // blank line
61
62    // close the file if the mode to be used is read mode  and re-open using read mode
63    // else rewind the file pointer to beginning of the file
64    if ( strstr($file_modes[$mode_counter], "r" ) ) {
65      fclose($file_handle);
66      $file_handle = fopen($filename, $file_modes[$mode_counter]);
67    } else {
68      // rewind the file pointer to bof
69      rewind($file_handle);
70    }
71
72    echo "\n-- Testing fgetcsv() with file opened using $file_modes[$mode_counter] mode --\n";
73
74    // call fgetcsv() to parse csv fields
75
76    // use different delimiter but same enclosure char
77    fseek($file_handle, 0, SEEK_SET);
78    $del = "+";
79    var_dump( fgetcsv($file_handle, 1024, $del, $enclosure) );
80    // check the file pointer position and if eof
81    var_dump( ftell($file_handle) );
82    var_dump( feof($file_handle) );
83
84    // close the file
85    fclose($file_handle);
86    //delete file
87    unlink($filename);
88  } //end of mode loop
89} // end of foreach
90
91echo "Done\n";
92?>
93--EXPECT--
94*** Testing fgetcsv() : with different delimiter but same enclosure ***
95
96-- Testing fgetcsv() with file opened using r mode --
97array(1) {
98  [0]=>
99  string(11) "water,fruit"
100}
101int(14)
102bool(false)
103
104-- Testing fgetcsv() with file opened using rb mode --
105array(1) {
106  [0]=>
107  string(11) "water,fruit"
108}
109int(14)
110bool(false)
111
112-- Testing fgetcsv() with file opened using rt mode --
113array(1) {
114  [0]=>
115  string(11) "water,fruit"
116}
117int(14)
118bool(false)
119
120-- Testing fgetcsv() with file opened using r+ mode --
121array(1) {
122  [0]=>
123  string(11) "water,fruit"
124}
125int(14)
126bool(false)
127
128-- Testing fgetcsv() with file opened using r+b mode --
129array(1) {
130  [0]=>
131  string(11) "water,fruit"
132}
133int(14)
134bool(false)
135
136-- Testing fgetcsv() with file opened using r+t mode --
137array(1) {
138  [0]=>
139  string(11) "water,fruit"
140}
141int(14)
142bool(false)
143
144-- Testing fgetcsv() with file opened using a+ mode --
145array(1) {
146  [0]=>
147  string(11) "water,fruit"
148}
149int(14)
150bool(false)
151
152-- Testing fgetcsv() with file opened using a+b mode --
153array(1) {
154  [0]=>
155  string(11) "water,fruit"
156}
157int(14)
158bool(false)
159
160-- Testing fgetcsv() with file opened using a+t mode --
161array(1) {
162  [0]=>
163  string(11) "water,fruit"
164}
165int(14)
166bool(false)
167
168-- Testing fgetcsv() with file opened using w+ mode --
169array(1) {
170  [0]=>
171  string(11) "water,fruit"
172}
173int(14)
174bool(false)
175
176-- Testing fgetcsv() with file opened using w+b mode --
177array(1) {
178  [0]=>
179  string(11) "water,fruit"
180}
181int(14)
182bool(false)
183
184-- Testing fgetcsv() with file opened using w+t mode --
185array(1) {
186  [0]=>
187  string(11) "water,fruit"
188}
189int(14)
190bool(false)
191
192-- Testing fgetcsv() with file opened using x+ mode --
193array(1) {
194  [0]=>
195  string(11) "water,fruit"
196}
197int(14)
198bool(false)
199
200-- Testing fgetcsv() with file opened using x+b mode --
201array(1) {
202  [0]=>
203  string(11) "water,fruit"
204}
205int(14)
206bool(false)
207
208-- Testing fgetcsv() with file opened using x+t mode --
209array(1) {
210  [0]=>
211  string(11) "water,fruit"
212}
213int(14)
214bool(false)
215
216-- Testing fgetcsv() with file opened using r mode --
217array(1) {
218  [0]=>
219  string(13) "water,"fruit""
220}
221int(16)
222bool(false)
223
224-- Testing fgetcsv() with file opened using rb mode --
225array(1) {
226  [0]=>
227  string(13) "water,"fruit""
228}
229int(16)
230bool(false)
231
232-- Testing fgetcsv() with file opened using rt mode --
233array(1) {
234  [0]=>
235  string(13) "water,"fruit""
236}
237int(16)
238bool(false)
239
240-- Testing fgetcsv() with file opened using r+ mode --
241array(1) {
242  [0]=>
243  string(13) "water,"fruit""
244}
245int(16)
246bool(false)
247
248-- Testing fgetcsv() with file opened using r+b mode --
249array(1) {
250  [0]=>
251  string(13) "water,"fruit""
252}
253int(16)
254bool(false)
255
256-- Testing fgetcsv() with file opened using r+t mode --
257array(1) {
258  [0]=>
259  string(13) "water,"fruit""
260}
261int(16)
262bool(false)
263
264-- Testing fgetcsv() with file opened using a+ mode --
265array(1) {
266  [0]=>
267  string(13) "water,"fruit""
268}
269int(16)
270bool(false)
271
272-- Testing fgetcsv() with file opened using a+b mode --
273array(1) {
274  [0]=>
275  string(13) "water,"fruit""
276}
277int(16)
278bool(false)
279
280-- Testing fgetcsv() with file opened using a+t mode --
281array(1) {
282  [0]=>
283  string(13) "water,"fruit""
284}
285int(16)
286bool(false)
287
288-- Testing fgetcsv() with file opened using w+ mode --
289array(1) {
290  [0]=>
291  string(13) "water,"fruit""
292}
293int(16)
294bool(false)
295
296-- Testing fgetcsv() with file opened using w+b mode --
297array(1) {
298  [0]=>
299  string(13) "water,"fruit""
300}
301int(16)
302bool(false)
303
304-- Testing fgetcsv() with file opened using w+t mode --
305array(1) {
306  [0]=>
307  string(13) "water,"fruit""
308}
309int(16)
310bool(false)
311
312-- Testing fgetcsv() with file opened using x+ mode --
313array(1) {
314  [0]=>
315  string(13) "water,"fruit""
316}
317int(16)
318bool(false)
319
320-- Testing fgetcsv() with file opened using x+b mode --
321array(1) {
322  [0]=>
323  string(13) "water,"fruit""
324}
325int(16)
326bool(false)
327
328-- Testing fgetcsv() with file opened using x+t mode --
329array(1) {
330  [0]=>
331  string(13) "water,"fruit""
332}
333int(16)
334bool(false)
335
336-- Testing fgetcsv() with file opened using r mode --
337array(1) {
338  [0]=>
339  string(13) "water ^fruit^"
340}
341int(16)
342bool(false)
343
344-- Testing fgetcsv() with file opened using rb mode --
345array(1) {
346  [0]=>
347  string(13) "water ^fruit^"
348}
349int(16)
350bool(false)
351
352-- Testing fgetcsv() with file opened using rt mode --
353array(1) {
354  [0]=>
355  string(13) "water ^fruit^"
356}
357int(16)
358bool(false)
359
360-- Testing fgetcsv() with file opened using r+ mode --
361array(1) {
362  [0]=>
363  string(13) "water ^fruit^"
364}
365int(16)
366bool(false)
367
368-- Testing fgetcsv() with file opened using r+b mode --
369array(1) {
370  [0]=>
371  string(13) "water ^fruit^"
372}
373int(16)
374bool(false)
375
376-- Testing fgetcsv() with file opened using r+t mode --
377array(1) {
378  [0]=>
379  string(13) "water ^fruit^"
380}
381int(16)
382bool(false)
383
384-- Testing fgetcsv() with file opened using a+ mode --
385array(1) {
386  [0]=>
387  string(13) "water ^fruit^"
388}
389int(16)
390bool(false)
391
392-- Testing fgetcsv() with file opened using a+b mode --
393array(1) {
394  [0]=>
395  string(13) "water ^fruit^"
396}
397int(16)
398bool(false)
399
400-- Testing fgetcsv() with file opened using a+t mode --
401array(1) {
402  [0]=>
403  string(13) "water ^fruit^"
404}
405int(16)
406bool(false)
407
408-- Testing fgetcsv() with file opened using w+ mode --
409array(1) {
410  [0]=>
411  string(13) "water ^fruit^"
412}
413int(16)
414bool(false)
415
416-- Testing fgetcsv() with file opened using w+b mode --
417array(1) {
418  [0]=>
419  string(13) "water ^fruit^"
420}
421int(16)
422bool(false)
423
424-- Testing fgetcsv() with file opened using w+t mode --
425array(1) {
426  [0]=>
427  string(13) "water ^fruit^"
428}
429int(16)
430bool(false)
431
432-- Testing fgetcsv() with file opened using x+ mode --
433array(1) {
434  [0]=>
435  string(13) "water ^fruit^"
436}
437int(16)
438bool(false)
439
440-- Testing fgetcsv() with file opened using x+b mode --
441array(1) {
442  [0]=>
443  string(13) "water ^fruit^"
444}
445int(16)
446bool(false)
447
448-- Testing fgetcsv() with file opened using x+t mode --
449array(1) {
450  [0]=>
451  string(13) "water ^fruit^"
452}
453int(16)
454bool(false)
455
456-- Testing fgetcsv() with file opened using r mode --
457array(1) {
458  [0]=>
459  string(13) "water:&fruit&"
460}
461int(16)
462bool(false)
463
464-- Testing fgetcsv() with file opened using rb mode --
465array(1) {
466  [0]=>
467  string(13) "water:&fruit&"
468}
469int(16)
470bool(false)
471
472-- Testing fgetcsv() with file opened using rt mode --
473array(1) {
474  [0]=>
475  string(13) "water:&fruit&"
476}
477int(16)
478bool(false)
479
480-- Testing fgetcsv() with file opened using r+ mode --
481array(1) {
482  [0]=>
483  string(13) "water:&fruit&"
484}
485int(16)
486bool(false)
487
488-- Testing fgetcsv() with file opened using r+b mode --
489array(1) {
490  [0]=>
491  string(13) "water:&fruit&"
492}
493int(16)
494bool(false)
495
496-- Testing fgetcsv() with file opened using r+t mode --
497array(1) {
498  [0]=>
499  string(13) "water:&fruit&"
500}
501int(16)
502bool(false)
503
504-- Testing fgetcsv() with file opened using a+ mode --
505array(1) {
506  [0]=>
507  string(13) "water:&fruit&"
508}
509int(16)
510bool(false)
511
512-- Testing fgetcsv() with file opened using a+b mode --
513array(1) {
514  [0]=>
515  string(13) "water:&fruit&"
516}
517int(16)
518bool(false)
519
520-- Testing fgetcsv() with file opened using a+t mode --
521array(1) {
522  [0]=>
523  string(13) "water:&fruit&"
524}
525int(16)
526bool(false)
527
528-- Testing fgetcsv() with file opened using w+ mode --
529array(1) {
530  [0]=>
531  string(13) "water:&fruit&"
532}
533int(16)
534bool(false)
535
536-- Testing fgetcsv() with file opened using w+b mode --
537array(1) {
538  [0]=>
539  string(13) "water:&fruit&"
540}
541int(16)
542bool(false)
543
544-- Testing fgetcsv() with file opened using w+t mode --
545array(1) {
546  [0]=>
547  string(13) "water:&fruit&"
548}
549int(16)
550bool(false)
551
552-- Testing fgetcsv() with file opened using x+ mode --
553array(1) {
554  [0]=>
555  string(13) "water:&fruit&"
556}
557int(16)
558bool(false)
559
560-- Testing fgetcsv() with file opened using x+b mode --
561array(1) {
562  [0]=>
563  string(13) "water:&fruit&"
564}
565int(16)
566bool(false)
567
568-- Testing fgetcsv() with file opened using x+t mode --
569array(1) {
570  [0]=>
571  string(13) "water:&fruit&"
572}
573int(16)
574bool(false)
575
576-- Testing fgetcsv() with file opened using r mode --
577array(1) {
578  [0]=>
579  string(12) "water=fruit="
580}
581int(16)
582bool(false)
583
584-- Testing fgetcsv() with file opened using rb mode --
585array(1) {
586  [0]=>
587  string(12) "water=fruit="
588}
589int(16)
590bool(false)
591
592-- Testing fgetcsv() with file opened using rt mode --
593array(1) {
594  [0]=>
595  string(12) "water=fruit="
596}
597int(16)
598bool(false)
599
600-- Testing fgetcsv() with file opened using r+ mode --
601array(1) {
602  [0]=>
603  string(12) "water=fruit="
604}
605int(16)
606bool(false)
607
608-- Testing fgetcsv() with file opened using r+b mode --
609array(1) {
610  [0]=>
611  string(12) "water=fruit="
612}
613int(16)
614bool(false)
615
616-- Testing fgetcsv() with file opened using r+t mode --
617array(1) {
618  [0]=>
619  string(12) "water=fruit="
620}
621int(16)
622bool(false)
623
624-- Testing fgetcsv() with file opened using a+ mode --
625array(1) {
626  [0]=>
627  string(12) "water=fruit="
628}
629int(16)
630bool(false)
631
632-- Testing fgetcsv() with file opened using a+b mode --
633array(1) {
634  [0]=>
635  string(12) "water=fruit="
636}
637int(16)
638bool(false)
639
640-- Testing fgetcsv() with file opened using a+t mode --
641array(1) {
642  [0]=>
643  string(12) "water=fruit="
644}
645int(16)
646bool(false)
647
648-- Testing fgetcsv() with file opened using w+ mode --
649array(1) {
650  [0]=>
651  string(12) "water=fruit="
652}
653int(16)
654bool(false)
655
656-- Testing fgetcsv() with file opened using w+b mode --
657array(1) {
658  [0]=>
659  string(12) "water=fruit="
660}
661int(16)
662bool(false)
663
664-- Testing fgetcsv() with file opened using w+t mode --
665array(1) {
666  [0]=>
667  string(12) "water=fruit="
668}
669int(16)
670bool(false)
671
672-- Testing fgetcsv() with file opened using x+ mode --
673array(1) {
674  [0]=>
675  string(12) "water=fruit="
676}
677int(16)
678bool(false)
679
680-- Testing fgetcsv() with file opened using x+b mode --
681array(1) {
682  [0]=>
683  string(12) "water=fruit="
684}
685int(16)
686bool(false)
687
688-- Testing fgetcsv() with file opened using x+t mode --
689array(1) {
690  [0]=>
691  string(12) "water=fruit="
692}
693int(16)
694bool(false)
695
696-- Testing fgetcsv() with file opened using r mode --
697array(1) {
698  [0]=>
699  string(14) "water-fruitair"
700}
701int(18)
702bool(false)
703
704-- Testing fgetcsv() with file opened using rb mode --
705array(1) {
706  [0]=>
707  string(14) "water-fruitair"
708}
709int(18)
710bool(false)
711
712-- Testing fgetcsv() with file opened using rt mode --
713array(1) {
714  [0]=>
715  string(14) "water-fruitair"
716}
717int(18)
718bool(false)
719
720-- Testing fgetcsv() with file opened using r+ mode --
721array(1) {
722  [0]=>
723  string(14) "water-fruitair"
724}
725int(18)
726bool(false)
727
728-- Testing fgetcsv() with file opened using r+b mode --
729array(1) {
730  [0]=>
731  string(14) "water-fruitair"
732}
733int(18)
734bool(false)
735
736-- Testing fgetcsv() with file opened using r+t mode --
737array(1) {
738  [0]=>
739  string(14) "water-fruitair"
740}
741int(18)
742bool(false)
743
744-- Testing fgetcsv() with file opened using a+ mode --
745array(1) {
746  [0]=>
747  string(14) "water-fruitair"
748}
749int(18)
750bool(false)
751
752-- Testing fgetcsv() with file opened using a+b mode --
753array(1) {
754  [0]=>
755  string(14) "water-fruitair"
756}
757int(18)
758bool(false)
759
760-- Testing fgetcsv() with file opened using a+t mode --
761array(1) {
762  [0]=>
763  string(14) "water-fruitair"
764}
765int(18)
766bool(false)
767
768-- Testing fgetcsv() with file opened using w+ mode --
769array(1) {
770  [0]=>
771  string(14) "water-fruitair"
772}
773int(18)
774bool(false)
775
776-- Testing fgetcsv() with file opened using w+b mode --
777array(1) {
778  [0]=>
779  string(14) "water-fruitair"
780}
781int(18)
782bool(false)
783
784-- Testing fgetcsv() with file opened using w+t mode --
785array(1) {
786  [0]=>
787  string(14) "water-fruitair"
788}
789int(18)
790bool(false)
791
792-- Testing fgetcsv() with file opened using x+ mode --
793array(1) {
794  [0]=>
795  string(14) "water-fruitair"
796}
797int(18)
798bool(false)
799
800-- Testing fgetcsv() with file opened using x+b mode --
801array(1) {
802  [0]=>
803  string(14) "water-fruitair"
804}
805int(18)
806bool(false)
807
808-- Testing fgetcsv() with file opened using x+t mode --
809array(1) {
810  [0]=>
811  string(14) "water-fruitair"
812}
813int(18)
814bool(false)
815
816-- Testing fgetcsv() with file opened using r mode --
817array(1) {
818  [0]=>
819  string(18) "water-fruit---air-"
820}
821int(22)
822bool(false)
823
824-- Testing fgetcsv() with file opened using rb mode --
825array(1) {
826  [0]=>
827  string(18) "water-fruit---air-"
828}
829int(22)
830bool(false)
831
832-- Testing fgetcsv() with file opened using rt mode --
833array(1) {
834  [0]=>
835  string(18) "water-fruit---air-"
836}
837int(22)
838bool(false)
839
840-- Testing fgetcsv() with file opened using r+ mode --
841array(1) {
842  [0]=>
843  string(18) "water-fruit---air-"
844}
845int(22)
846bool(false)
847
848-- Testing fgetcsv() with file opened using r+b mode --
849array(1) {
850  [0]=>
851  string(18) "water-fruit---air-"
852}
853int(22)
854bool(false)
855
856-- Testing fgetcsv() with file opened using r+t mode --
857array(1) {
858  [0]=>
859  string(18) "water-fruit---air-"
860}
861int(22)
862bool(false)
863
864-- Testing fgetcsv() with file opened using a+ mode --
865array(1) {
866  [0]=>
867  string(18) "water-fruit---air-"
868}
869int(22)
870bool(false)
871
872-- Testing fgetcsv() with file opened using a+b mode --
873array(1) {
874  [0]=>
875  string(18) "water-fruit---air-"
876}
877int(22)
878bool(false)
879
880-- Testing fgetcsv() with file opened using a+t mode --
881array(1) {
882  [0]=>
883  string(18) "water-fruit---air-"
884}
885int(22)
886bool(false)
887
888-- Testing fgetcsv() with file opened using w+ mode --
889array(1) {
890  [0]=>
891  string(18) "water-fruit---air-"
892}
893int(22)
894bool(false)
895
896-- Testing fgetcsv() with file opened using w+b mode --
897array(1) {
898  [0]=>
899  string(18) "water-fruit---air-"
900}
901int(22)
902bool(false)
903
904-- Testing fgetcsv() with file opened using w+t mode --
905array(1) {
906  [0]=>
907  string(18) "water-fruit---air-"
908}
909int(22)
910bool(false)
911
912-- Testing fgetcsv() with file opened using x+ mode --
913array(1) {
914  [0]=>
915  string(18) "water-fruit---air-"
916}
917int(22)
918bool(false)
919
920-- Testing fgetcsv() with file opened using x+b mode --
921array(1) {
922  [0]=>
923  string(18) "water-fruit---air-"
924}
925int(22)
926bool(false)
927
928-- Testing fgetcsv() with file opened using x+t mode --
929array(1) {
930  [0]=>
931  string(18) "water-fruit---air-"
932}
933int(22)
934bool(false)
935
936-- Testing fgetcsv() with file opened using r mode --
937array(1) {
938  [0]=>
939  string(21) """"":&"&:,:":&,&:,,,,"
940}
941int(24)
942bool(false)
943
944-- Testing fgetcsv() with file opened using rb mode --
945array(1) {
946  [0]=>
947  string(21) """"":&"&:,:":&,&:,,,,"
948}
949int(24)
950bool(false)
951
952-- Testing fgetcsv() with file opened using rt mode --
953array(1) {
954  [0]=>
955  string(21) """"":&"&:,:":&,&:,,,,"
956}
957int(24)
958bool(false)
959
960-- Testing fgetcsv() with file opened using r+ mode --
961array(1) {
962  [0]=>
963  string(21) """"":&"&:,:":&,&:,,,,"
964}
965int(24)
966bool(false)
967
968-- Testing fgetcsv() with file opened using r+b mode --
969array(1) {
970  [0]=>
971  string(21) """"":&"&:,:":&,&:,,,,"
972}
973int(24)
974bool(false)
975
976-- Testing fgetcsv() with file opened using r+t mode --
977array(1) {
978  [0]=>
979  string(21) """"":&"&:,:":&,&:,,,,"
980}
981int(24)
982bool(false)
983
984-- Testing fgetcsv() with file opened using a+ mode --
985array(1) {
986  [0]=>
987  string(21) """"":&"&:,:":&,&:,,,,"
988}
989int(24)
990bool(false)
991
992-- Testing fgetcsv() with file opened using a+b mode --
993array(1) {
994  [0]=>
995  string(21) """"":&"&:,:":&,&:,,,,"
996}
997int(24)
998bool(false)
999
1000-- Testing fgetcsv() with file opened using a+t mode --
1001array(1) {
1002  [0]=>
1003  string(21) """"":&"&:,:":&,&:,,,,"
1004}
1005int(24)
1006bool(false)
1007
1008-- Testing fgetcsv() with file opened using w+ mode --
1009array(1) {
1010  [0]=>
1011  string(21) """"":&"&:,:":&,&:,,,,"
1012}
1013int(24)
1014bool(false)
1015
1016-- Testing fgetcsv() with file opened using w+b mode --
1017array(1) {
1018  [0]=>
1019  string(21) """"":&"&:,:":&,&:,,,,"
1020}
1021int(24)
1022bool(false)
1023
1024-- Testing fgetcsv() with file opened using w+t mode --
1025array(1) {
1026  [0]=>
1027  string(21) """"":&"&:,:":&,&:,,,,"
1028}
1029int(24)
1030bool(false)
1031
1032-- Testing fgetcsv() with file opened using x+ mode --
1033array(1) {
1034  [0]=>
1035  string(21) """"":&"&:,:":&,&:,,,,"
1036}
1037int(24)
1038bool(false)
1039
1040-- Testing fgetcsv() with file opened using x+b mode --
1041array(1) {
1042  [0]=>
1043  string(21) """"":&"&:,:":&,&:,,,,"
1044}
1045int(24)
1046bool(false)
1047
1048-- Testing fgetcsv() with file opened using x+t mode --
1049array(1) {
1050  [0]=>
1051  string(21) """"":&"&:,:":&,&:,,,,"
1052}
1053int(24)
1054bool(false)
1055Done
1056