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