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