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