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