Annotation of embedaddon/php/ext/standard/tests/file/fgetcsv_variation6.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test fgetcsv() : usage variations - with length less than line size
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 the length argument
12: value less than the line size
13: */
14:
15: echo "*** Testing fgetcsv() : with length less than line size ***\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_variation6.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 length as less than the actual size of the line
78: fseek($file_handle, 0, SEEK_SET);
79: var_dump( fgetcsv($file_handle, 9, $delimiter, $enclosure) );
80: // check the file pointer position and if eof
81: var_dump( ftell($file_handle) );
82: var_dump( feof($file_handle) );
83: // read rest of the line
84: var_dump( fgetcsv($file_handle, 1024, $delimiter, $enclosure) );
85: // check the file pointer position and if eof
86: var_dump( ftell($file_handle) );
87: var_dump( feof($file_handle) );
88:
89: // close the file
90: fclose($file_handle);
91: //delete file
92: unlink($filename);
93: } //end of mode loop
94: } // end of foreach
95:
96: echo "Done\n";
97: ?>
98: --EXPECT--
99: *** Testing fgetcsv() : with length less than line size ***
100:
101: -- Testing fgetcsv() with file opened using r mode --
102: array(2) {
103: [0]=>
104: string(5) "water"
105: [1]=>
106: string(1) "f"
107: }
108: int(9)
109: bool(false)
110: array(1) {
111: [0]=>
112: string(4) "ruit"
113: }
114: int(14)
115: bool(false)
116:
117: -- Testing fgetcsv() with file opened using rb mode --
118: array(2) {
119: [0]=>
120: string(5) "water"
121: [1]=>
122: string(1) "f"
123: }
124: int(9)
125: bool(false)
126: array(1) {
127: [0]=>
128: string(4) "ruit"
129: }
130: int(14)
131: bool(false)
132:
133: -- Testing fgetcsv() with file opened using rt mode --
134: array(2) {
135: [0]=>
136: string(5) "water"
137: [1]=>
138: string(1) "f"
139: }
140: int(9)
141: bool(false)
142: array(1) {
143: [0]=>
144: string(4) "ruit"
145: }
146: int(14)
147: bool(false)
148:
149: -- Testing fgetcsv() with file opened using r+ mode --
150: array(2) {
151: [0]=>
152: string(5) "water"
153: [1]=>
154: string(1) "f"
155: }
156: int(9)
157: bool(false)
158: array(1) {
159: [0]=>
160: string(4) "ruit"
161: }
162: int(14)
163: bool(false)
164:
165: -- Testing fgetcsv() with file opened using r+b mode --
166: array(2) {
167: [0]=>
168: string(5) "water"
169: [1]=>
170: string(1) "f"
171: }
172: int(9)
173: bool(false)
174: array(1) {
175: [0]=>
176: string(4) "ruit"
177: }
178: int(14)
179: bool(false)
180:
181: -- Testing fgetcsv() with file opened using r+t mode --
182: array(2) {
183: [0]=>
184: string(5) "water"
185: [1]=>
186: string(1) "f"
187: }
188: int(9)
189: bool(false)
190: array(1) {
191: [0]=>
192: string(4) "ruit"
193: }
194: int(14)
195: bool(false)
196:
197: -- Testing fgetcsv() with file opened using a+ mode --
198: array(2) {
199: [0]=>
200: string(5) "water"
201: [1]=>
202: string(1) "f"
203: }
204: int(9)
205: bool(false)
206: array(1) {
207: [0]=>
208: string(4) "ruit"
209: }
210: int(14)
211: bool(false)
212:
213: -- Testing fgetcsv() with file opened using a+b mode --
214: array(2) {
215: [0]=>
216: string(5) "water"
217: [1]=>
218: string(1) "f"
219: }
220: int(9)
221: bool(false)
222: array(1) {
223: [0]=>
224: string(4) "ruit"
225: }
226: int(14)
227: bool(false)
228:
229: -- Testing fgetcsv() with file opened using a+t mode --
230: array(2) {
231: [0]=>
232: string(5) "water"
233: [1]=>
234: string(1) "f"
235: }
236: int(9)
237: bool(false)
238: array(1) {
239: [0]=>
240: string(4) "ruit"
241: }
242: int(14)
243: bool(false)
244:
245: -- Testing fgetcsv() with file opened using w+ mode --
246: array(2) {
247: [0]=>
248: string(5) "water"
249: [1]=>
250: string(1) "f"
251: }
252: int(9)
253: bool(false)
254: array(1) {
255: [0]=>
256: string(4) "ruit"
257: }
258: int(14)
259: bool(false)
260:
261: -- Testing fgetcsv() with file opened using w+b mode --
262: array(2) {
263: [0]=>
264: string(5) "water"
265: [1]=>
266: string(1) "f"
267: }
268: int(9)
269: bool(false)
270: array(1) {
271: [0]=>
272: string(4) "ruit"
273: }
274: int(14)
275: bool(false)
276:
277: -- Testing fgetcsv() with file opened using w+t mode --
278: array(2) {
279: [0]=>
280: string(5) "water"
281: [1]=>
282: string(1) "f"
283: }
284: int(9)
285: bool(false)
286: array(1) {
287: [0]=>
288: string(4) "ruit"
289: }
290: int(14)
291: bool(false)
292:
293: -- Testing fgetcsv() with file opened using x+ mode --
294: array(2) {
295: [0]=>
296: string(5) "water"
297: [1]=>
298: string(1) "f"
299: }
300: int(9)
301: bool(false)
302: array(1) {
303: [0]=>
304: string(4) "ruit"
305: }
306: int(14)
307: bool(false)
308:
309: -- Testing fgetcsv() with file opened using x+b mode --
310: array(2) {
311: [0]=>
312: string(5) "water"
313: [1]=>
314: string(1) "f"
315: }
316: int(9)
317: bool(false)
318: array(1) {
319: [0]=>
320: string(4) "ruit"
321: }
322: int(14)
323: bool(false)
324:
325: -- Testing fgetcsv() with file opened using x+t mode --
326: array(2) {
327: [0]=>
328: string(5) "water"
329: [1]=>
330: string(1) "f"
331: }
332: int(9)
333: bool(false)
334: array(1) {
335: [0]=>
336: string(4) "ruit"
337: }
338: int(14)
339: bool(false)
340:
341: -- Testing fgetcsv() with file opened using r mode --
342: array(2) {
343: [0]=>
344: string(5) "water"
345: [1]=>
346: string(5) "fruit"
347: }
348: int(16)
349: bool(false)
350: array(1) {
351: [0]=>
352: string(39) "This is line of text without csv fields"
353: }
354: int(56)
355: bool(false)
356:
357: -- Testing fgetcsv() with file opened using rb mode --
358: array(2) {
359: [0]=>
360: string(5) "water"
361: [1]=>
362: string(5) "fruit"
363: }
364: int(16)
365: bool(false)
366: array(1) {
367: [0]=>
368: string(39) "This is line of text without csv fields"
369: }
370: int(56)
371: bool(false)
372:
373: -- Testing fgetcsv() with file opened using rt mode --
374: array(2) {
375: [0]=>
376: string(5) "water"
377: [1]=>
378: string(5) "fruit"
379: }
380: int(16)
381: bool(false)
382: array(1) {
383: [0]=>
384: string(39) "This is line of text without csv fields"
385: }
386: int(56)
387: bool(false)
388:
389: -- Testing fgetcsv() with file opened using r+ mode --
390: array(2) {
391: [0]=>
392: string(5) "water"
393: [1]=>
394: string(5) "fruit"
395: }
396: int(16)
397: bool(false)
398: array(1) {
399: [0]=>
400: string(39) "This is line of text without csv fields"
401: }
402: int(56)
403: bool(false)
404:
405: -- Testing fgetcsv() with file opened using r+b mode --
406: array(2) {
407: [0]=>
408: string(5) "water"
409: [1]=>
410: string(5) "fruit"
411: }
412: int(16)
413: bool(false)
414: array(1) {
415: [0]=>
416: string(39) "This is line of text without csv fields"
417: }
418: int(56)
419: bool(false)
420:
421: -- Testing fgetcsv() with file opened using r+t mode --
422: array(2) {
423: [0]=>
424: string(5) "water"
425: [1]=>
426: string(5) "fruit"
427: }
428: int(16)
429: bool(false)
430: array(1) {
431: [0]=>
432: string(39) "This is line of text without csv fields"
433: }
434: int(56)
435: bool(false)
436:
437: -- Testing fgetcsv() with file opened using a+ mode --
438: array(2) {
439: [0]=>
440: string(5) "water"
441: [1]=>
442: string(5) "fruit"
443: }
444: int(16)
445: bool(false)
446: array(1) {
447: [0]=>
448: string(39) "This is line of text without csv fields"
449: }
450: int(56)
451: bool(false)
452:
453: -- Testing fgetcsv() with file opened using a+b mode --
454: array(2) {
455: [0]=>
456: string(5) "water"
457: [1]=>
458: string(5) "fruit"
459: }
460: int(16)
461: bool(false)
462: array(1) {
463: [0]=>
464: string(39) "This is line of text without csv fields"
465: }
466: int(56)
467: bool(false)
468:
469: -- Testing fgetcsv() with file opened using a+t mode --
470: array(2) {
471: [0]=>
472: string(5) "water"
473: [1]=>
474: string(5) "fruit"
475: }
476: int(16)
477: bool(false)
478: array(1) {
479: [0]=>
480: string(39) "This is line of text without csv fields"
481: }
482: int(56)
483: bool(false)
484:
485: -- Testing fgetcsv() with file opened using w+ mode --
486: array(2) {
487: [0]=>
488: string(5) "water"
489: [1]=>
490: string(5) "fruit"
491: }
492: int(16)
493: bool(false)
494: array(1) {
495: [0]=>
496: string(39) "This is line of text without csv fields"
497: }
498: int(56)
499: bool(false)
500:
501: -- Testing fgetcsv() with file opened using w+b mode --
502: array(2) {
503: [0]=>
504: string(5) "water"
505: [1]=>
506: string(5) "fruit"
507: }
508: int(16)
509: bool(false)
510: array(1) {
511: [0]=>
512: string(39) "This is line of text without csv fields"
513: }
514: int(56)
515: bool(false)
516:
517: -- Testing fgetcsv() with file opened using w+t mode --
518: array(2) {
519: [0]=>
520: string(5) "water"
521: [1]=>
522: string(5) "fruit"
523: }
524: int(16)
525: bool(false)
526: array(1) {
527: [0]=>
528: string(39) "This is line of text without csv fields"
529: }
530: int(56)
531: bool(false)
532:
533: -- Testing fgetcsv() with file opened using x+ mode --
534: array(2) {
535: [0]=>
536: string(5) "water"
537: [1]=>
538: string(5) "fruit"
539: }
540: int(16)
541: bool(false)
542: array(1) {
543: [0]=>
544: string(39) "This is line of text without csv fields"
545: }
546: int(56)
547: bool(false)
548:
549: -- Testing fgetcsv() with file opened using x+b mode --
550: array(2) {
551: [0]=>
552: string(5) "water"
553: [1]=>
554: string(5) "fruit"
555: }
556: int(16)
557: bool(false)
558: array(1) {
559: [0]=>
560: string(39) "This is line of text without csv fields"
561: }
562: int(56)
563: bool(false)
564:
565: -- Testing fgetcsv() with file opened using x+t mode --
566: array(2) {
567: [0]=>
568: string(5) "water"
569: [1]=>
570: string(5) "fruit"
571: }
572: int(16)
573: bool(false)
574: array(1) {
575: [0]=>
576: string(39) "This is line of text without csv fields"
577: }
578: int(56)
579: bool(false)
580:
581: -- Testing fgetcsv() with file opened using r mode --
582: array(2) {
583: [0]=>
584: string(5) "water"
585: [1]=>
586: string(5) "fruit"
587: }
588: int(16)
589: bool(false)
590: array(8) {
591: [0]=>
592: string(4) "This"
593: [1]=>
594: string(2) "is"
595: [2]=>
596: string(4) "line"
597: [3]=>
598: string(2) "of"
599: [4]=>
600: string(4) "text"
601: [5]=>
602: string(7) "without"
603: [6]=>
604: string(3) "csv"
605: [7]=>
606: string(6) "fields"
607: }
608: int(56)
609: bool(false)
610:
611: -- Testing fgetcsv() with file opened using rb mode --
612: array(2) {
613: [0]=>
614: string(5) "water"
615: [1]=>
616: string(5) "fruit"
617: }
618: int(16)
619: bool(false)
620: array(8) {
621: [0]=>
622: string(4) "This"
623: [1]=>
624: string(2) "is"
625: [2]=>
626: string(4) "line"
627: [3]=>
628: string(2) "of"
629: [4]=>
630: string(4) "text"
631: [5]=>
632: string(7) "without"
633: [6]=>
634: string(3) "csv"
635: [7]=>
636: string(6) "fields"
637: }
638: int(56)
639: bool(false)
640:
641: -- Testing fgetcsv() with file opened using rt mode --
642: array(2) {
643: [0]=>
644: string(5) "water"
645: [1]=>
646: string(5) "fruit"
647: }
648: int(16)
649: bool(false)
650: array(8) {
651: [0]=>
652: string(4) "This"
653: [1]=>
654: string(2) "is"
655: [2]=>
656: string(4) "line"
657: [3]=>
658: string(2) "of"
659: [4]=>
660: string(4) "text"
661: [5]=>
662: string(7) "without"
663: [6]=>
664: string(3) "csv"
665: [7]=>
666: string(6) "fields"
667: }
668: int(56)
669: bool(false)
670:
671: -- Testing fgetcsv() with file opened using r+ mode --
672: array(2) {
673: [0]=>
674: string(5) "water"
675: [1]=>
676: string(5) "fruit"
677: }
678: int(16)
679: bool(false)
680: array(8) {
681: [0]=>
682: string(4) "This"
683: [1]=>
684: string(2) "is"
685: [2]=>
686: string(4) "line"
687: [3]=>
688: string(2) "of"
689: [4]=>
690: string(4) "text"
691: [5]=>
692: string(7) "without"
693: [6]=>
694: string(3) "csv"
695: [7]=>
696: string(6) "fields"
697: }
698: int(56)
699: bool(false)
700:
701: -- Testing fgetcsv() with file opened using r+b mode --
702: array(2) {
703: [0]=>
704: string(5) "water"
705: [1]=>
706: string(5) "fruit"
707: }
708: int(16)
709: bool(false)
710: array(8) {
711: [0]=>
712: string(4) "This"
713: [1]=>
714: string(2) "is"
715: [2]=>
716: string(4) "line"
717: [3]=>
718: string(2) "of"
719: [4]=>
720: string(4) "text"
721: [5]=>
722: string(7) "without"
723: [6]=>
724: string(3) "csv"
725: [7]=>
726: string(6) "fields"
727: }
728: int(56)
729: bool(false)
730:
731: -- Testing fgetcsv() with file opened using r+t mode --
732: array(2) {
733: [0]=>
734: string(5) "water"
735: [1]=>
736: string(5) "fruit"
737: }
738: int(16)
739: bool(false)
740: array(8) {
741: [0]=>
742: string(4) "This"
743: [1]=>
744: string(2) "is"
745: [2]=>
746: string(4) "line"
747: [3]=>
748: string(2) "of"
749: [4]=>
750: string(4) "text"
751: [5]=>
752: string(7) "without"
753: [6]=>
754: string(3) "csv"
755: [7]=>
756: string(6) "fields"
757: }
758: int(56)
759: bool(false)
760:
761: -- Testing fgetcsv() with file opened using a+ mode --
762: array(2) {
763: [0]=>
764: string(5) "water"
765: [1]=>
766: string(5) "fruit"
767: }
768: int(16)
769: bool(false)
770: array(8) {
771: [0]=>
772: string(4) "This"
773: [1]=>
774: string(2) "is"
775: [2]=>
776: string(4) "line"
777: [3]=>
778: string(2) "of"
779: [4]=>
780: string(4) "text"
781: [5]=>
782: string(7) "without"
783: [6]=>
784: string(3) "csv"
785: [7]=>
786: string(6) "fields"
787: }
788: int(56)
789: bool(false)
790:
791: -- Testing fgetcsv() with file opened using a+b mode --
792: array(2) {
793: [0]=>
794: string(5) "water"
795: [1]=>
796: string(5) "fruit"
797: }
798: int(16)
799: bool(false)
800: array(8) {
801: [0]=>
802: string(4) "This"
803: [1]=>
804: string(2) "is"
805: [2]=>
806: string(4) "line"
807: [3]=>
808: string(2) "of"
809: [4]=>
810: string(4) "text"
811: [5]=>
812: string(7) "without"
813: [6]=>
814: string(3) "csv"
815: [7]=>
816: string(6) "fields"
817: }
818: int(56)
819: bool(false)
820:
821: -- Testing fgetcsv() with file opened using a+t mode --
822: array(2) {
823: [0]=>
824: string(5) "water"
825: [1]=>
826: string(5) "fruit"
827: }
828: int(16)
829: bool(false)
830: array(8) {
831: [0]=>
832: string(4) "This"
833: [1]=>
834: string(2) "is"
835: [2]=>
836: string(4) "line"
837: [3]=>
838: string(2) "of"
839: [4]=>
840: string(4) "text"
841: [5]=>
842: string(7) "without"
843: [6]=>
844: string(3) "csv"
845: [7]=>
846: string(6) "fields"
847: }
848: int(56)
849: bool(false)
850:
851: -- Testing fgetcsv() with file opened using w+ mode --
852: array(2) {
853: [0]=>
854: string(5) "water"
855: [1]=>
856: string(5) "fruit"
857: }
858: int(16)
859: bool(false)
860: array(8) {
861: [0]=>
862: string(4) "This"
863: [1]=>
864: string(2) "is"
865: [2]=>
866: string(4) "line"
867: [3]=>
868: string(2) "of"
869: [4]=>
870: string(4) "text"
871: [5]=>
872: string(7) "without"
873: [6]=>
874: string(3) "csv"
875: [7]=>
876: string(6) "fields"
877: }
878: int(56)
879: bool(false)
880:
881: -- Testing fgetcsv() with file opened using w+b mode --
882: array(2) {
883: [0]=>
884: string(5) "water"
885: [1]=>
886: string(5) "fruit"
887: }
888: int(16)
889: bool(false)
890: array(8) {
891: [0]=>
892: string(4) "This"
893: [1]=>
894: string(2) "is"
895: [2]=>
896: string(4) "line"
897: [3]=>
898: string(2) "of"
899: [4]=>
900: string(4) "text"
901: [5]=>
902: string(7) "without"
903: [6]=>
904: string(3) "csv"
905: [7]=>
906: string(6) "fields"
907: }
908: int(56)
909: bool(false)
910:
911: -- Testing fgetcsv() with file opened using w+t mode --
912: array(2) {
913: [0]=>
914: string(5) "water"
915: [1]=>
916: string(5) "fruit"
917: }
918: int(16)
919: bool(false)
920: array(8) {
921: [0]=>
922: string(4) "This"
923: [1]=>
924: string(2) "is"
925: [2]=>
926: string(4) "line"
927: [3]=>
928: string(2) "of"
929: [4]=>
930: string(4) "text"
931: [5]=>
932: string(7) "without"
933: [6]=>
934: string(3) "csv"
935: [7]=>
936: string(6) "fields"
937: }
938: int(56)
939: bool(false)
940:
941: -- Testing fgetcsv() with file opened using x+ mode --
942: array(2) {
943: [0]=>
944: string(5) "water"
945: [1]=>
946: string(5) "fruit"
947: }
948: int(16)
949: bool(false)
950: array(8) {
951: [0]=>
952: string(4) "This"
953: [1]=>
954: string(2) "is"
955: [2]=>
956: string(4) "line"
957: [3]=>
958: string(2) "of"
959: [4]=>
960: string(4) "text"
961: [5]=>
962: string(7) "without"
963: [6]=>
964: string(3) "csv"
965: [7]=>
966: string(6) "fields"
967: }
968: int(56)
969: bool(false)
970:
971: -- Testing fgetcsv() with file opened using x+b mode --
972: array(2) {
973: [0]=>
974: string(5) "water"
975: [1]=>
976: string(5) "fruit"
977: }
978: int(16)
979: bool(false)
980: array(8) {
981: [0]=>
982: string(4) "This"
983: [1]=>
984: string(2) "is"
985: [2]=>
986: string(4) "line"
987: [3]=>
988: string(2) "of"
989: [4]=>
990: string(4) "text"
991: [5]=>
992: string(7) "without"
993: [6]=>
994: string(3) "csv"
995: [7]=>
996: string(6) "fields"
997: }
998: int(56)
999: bool(false)
1000:
1001: -- Testing fgetcsv() with file opened using x+t mode --
1002: array(2) {
1003: [0]=>
1004: string(5) "water"
1005: [1]=>
1006: string(5) "fruit"
1007: }
1008: int(16)
1009: bool(false)
1010: array(8) {
1011: [0]=>
1012: string(4) "This"
1013: [1]=>
1014: string(2) "is"
1015: [2]=>
1016: string(4) "line"
1017: [3]=>
1018: string(2) "of"
1019: [4]=>
1020: string(4) "text"
1021: [5]=>
1022: string(7) "without"
1023: [6]=>
1024: string(3) "csv"
1025: [7]=>
1026: string(6) "fields"
1027: }
1028: int(56)
1029: bool(false)
1030:
1031: -- Testing fgetcsv() with file opened using r mode --
1032: array(2) {
1033: [0]=>
1034: string(5) "water"
1035: [1]=>
1036: string(5) "fruit"
1037: }
1038: int(16)
1039: bool(false)
1040: array(1) {
1041: [0]=>
1042: string(39) "This is line of text without csv fields"
1043: }
1044: int(56)
1045: bool(false)
1046:
1047: -- Testing fgetcsv() with file opened using rb mode --
1048: array(2) {
1049: [0]=>
1050: string(5) "water"
1051: [1]=>
1052: string(5) "fruit"
1053: }
1054: int(16)
1055: bool(false)
1056: array(1) {
1057: [0]=>
1058: string(39) "This is line of text without csv fields"
1059: }
1060: int(56)
1061: bool(false)
1062:
1063: -- Testing fgetcsv() with file opened using rt mode --
1064: array(2) {
1065: [0]=>
1066: string(5) "water"
1067: [1]=>
1068: string(5) "fruit"
1069: }
1070: int(16)
1071: bool(false)
1072: array(1) {
1073: [0]=>
1074: string(39) "This is line of text without csv fields"
1075: }
1076: int(56)
1077: bool(false)
1078:
1079: -- Testing fgetcsv() with file opened using r+ mode --
1080: array(2) {
1081: [0]=>
1082: string(5) "water"
1083: [1]=>
1084: string(5) "fruit"
1085: }
1086: int(16)
1087: bool(false)
1088: array(1) {
1089: [0]=>
1090: string(39) "This is line of text without csv fields"
1091: }
1092: int(56)
1093: bool(false)
1094:
1095: -- Testing fgetcsv() with file opened using r+b mode --
1096: array(2) {
1097: [0]=>
1098: string(5) "water"
1099: [1]=>
1100: string(5) "fruit"
1101: }
1102: int(16)
1103: bool(false)
1104: array(1) {
1105: [0]=>
1106: string(39) "This is line of text without csv fields"
1107: }
1108: int(56)
1109: bool(false)
1110:
1111: -- Testing fgetcsv() with file opened using r+t mode --
1112: array(2) {
1113: [0]=>
1114: string(5) "water"
1115: [1]=>
1116: string(5) "fruit"
1117: }
1118: int(16)
1119: bool(false)
1120: array(1) {
1121: [0]=>
1122: string(39) "This is line of text without csv fields"
1123: }
1124: int(56)
1125: bool(false)
1126:
1127: -- Testing fgetcsv() with file opened using a+ mode --
1128: array(2) {
1129: [0]=>
1130: string(5) "water"
1131: [1]=>
1132: string(5) "fruit"
1133: }
1134: int(16)
1135: bool(false)
1136: array(1) {
1137: [0]=>
1138: string(39) "This is line of text without csv fields"
1139: }
1140: int(56)
1141: bool(false)
1142:
1143: -- Testing fgetcsv() with file opened using a+b mode --
1144: array(2) {
1145: [0]=>
1146: string(5) "water"
1147: [1]=>
1148: string(5) "fruit"
1149: }
1150: int(16)
1151: bool(false)
1152: array(1) {
1153: [0]=>
1154: string(39) "This is line of text without csv fields"
1155: }
1156: int(56)
1157: bool(false)
1158:
1159: -- Testing fgetcsv() with file opened using a+t mode --
1160: array(2) {
1161: [0]=>
1162: string(5) "water"
1163: [1]=>
1164: string(5) "fruit"
1165: }
1166: int(16)
1167: bool(false)
1168: array(1) {
1169: [0]=>
1170: string(39) "This is line of text without csv fields"
1171: }
1172: int(56)
1173: bool(false)
1174:
1175: -- Testing fgetcsv() with file opened using w+ mode --
1176: array(2) {
1177: [0]=>
1178: string(5) "water"
1179: [1]=>
1180: string(5) "fruit"
1181: }
1182: int(16)
1183: bool(false)
1184: array(1) {
1185: [0]=>
1186: string(39) "This is line of text without csv fields"
1187: }
1188: int(56)
1189: bool(false)
1190:
1191: -- Testing fgetcsv() with file opened using w+b mode --
1192: array(2) {
1193: [0]=>
1194: string(5) "water"
1195: [1]=>
1196: string(5) "fruit"
1197: }
1198: int(16)
1199: bool(false)
1200: array(1) {
1201: [0]=>
1202: string(39) "This is line of text without csv fields"
1203: }
1204: int(56)
1205: bool(false)
1206:
1207: -- Testing fgetcsv() with file opened using w+t mode --
1208: array(2) {
1209: [0]=>
1210: string(5) "water"
1211: [1]=>
1212: string(5) "fruit"
1213: }
1214: int(16)
1215: bool(false)
1216: array(1) {
1217: [0]=>
1218: string(39) "This is line of text without csv fields"
1219: }
1220: int(56)
1221: bool(false)
1222:
1223: -- Testing fgetcsv() with file opened using x+ mode --
1224: array(2) {
1225: [0]=>
1226: string(5) "water"
1227: [1]=>
1228: string(5) "fruit"
1229: }
1230: int(16)
1231: bool(false)
1232: array(1) {
1233: [0]=>
1234: string(39) "This is line of text without csv fields"
1235: }
1236: int(56)
1237: bool(false)
1238:
1239: -- Testing fgetcsv() with file opened using x+b mode --
1240: array(2) {
1241: [0]=>
1242: string(5) "water"
1243: [1]=>
1244: string(5) "fruit"
1245: }
1246: int(16)
1247: bool(false)
1248: array(1) {
1249: [0]=>
1250: string(39) "This is line of text without csv fields"
1251: }
1252: int(56)
1253: bool(false)
1254:
1255: -- Testing fgetcsv() with file opened using x+t mode --
1256: array(2) {
1257: [0]=>
1258: string(5) "water"
1259: [1]=>
1260: string(5) "fruit"
1261: }
1262: int(16)
1263: bool(false)
1264: array(1) {
1265: [0]=>
1266: string(39) "This is line of text without csv fields"
1267: }
1268: int(56)
1269: bool(false)
1270:
1271: -- Testing fgetcsv() with file opened using r mode --
1272: array(1) {
1273: [0]=>
1274: string(6) "water="
1275: }
1276: int(9)
1277: bool(false)
1278: array(2) {
1279: [0]=>
1280: string(5) "fruit"
1281: [1]=>
1282: string(0) ""
1283: }
1284: int(16)
1285: bool(false)
1286:
1287: -- Testing fgetcsv() with file opened using rb mode --
1288: array(1) {
1289: [0]=>
1290: string(6) "water="
1291: }
1292: int(9)
1293: bool(false)
1294: array(2) {
1295: [0]=>
1296: string(5) "fruit"
1297: [1]=>
1298: string(0) ""
1299: }
1300: int(16)
1301: bool(false)
1302:
1303: -- Testing fgetcsv() with file opened using rt mode --
1304: array(1) {
1305: [0]=>
1306: string(6) "water="
1307: }
1308: int(9)
1309: bool(false)
1310: array(2) {
1311: [0]=>
1312: string(5) "fruit"
1313: [1]=>
1314: string(0) ""
1315: }
1316: int(16)
1317: bool(false)
1318:
1319: -- Testing fgetcsv() with file opened using r+ mode --
1320: array(1) {
1321: [0]=>
1322: string(6) "water="
1323: }
1324: int(9)
1325: bool(false)
1326: array(2) {
1327: [0]=>
1328: string(5) "fruit"
1329: [1]=>
1330: string(0) ""
1331: }
1332: int(16)
1333: bool(false)
1334:
1335: -- Testing fgetcsv() with file opened using r+b mode --
1336: array(1) {
1337: [0]=>
1338: string(6) "water="
1339: }
1340: int(9)
1341: bool(false)
1342: array(2) {
1343: [0]=>
1344: string(5) "fruit"
1345: [1]=>
1346: string(0) ""
1347: }
1348: int(16)
1349: bool(false)
1350:
1351: -- Testing fgetcsv() with file opened using r+t mode --
1352: array(1) {
1353: [0]=>
1354: string(6) "water="
1355: }
1356: int(9)
1357: bool(false)
1358: array(2) {
1359: [0]=>
1360: string(5) "fruit"
1361: [1]=>
1362: string(0) ""
1363: }
1364: int(16)
1365: bool(false)
1366:
1367: -- Testing fgetcsv() with file opened using a+ mode --
1368: array(1) {
1369: [0]=>
1370: string(6) "water="
1371: }
1372: int(9)
1373: bool(false)
1374: array(2) {
1375: [0]=>
1376: string(5) "fruit"
1377: [1]=>
1378: string(0) ""
1379: }
1380: int(16)
1381: bool(false)
1382:
1383: -- Testing fgetcsv() with file opened using a+b mode --
1384: array(1) {
1385: [0]=>
1386: string(6) "water="
1387: }
1388: int(9)
1389: bool(false)
1390: array(2) {
1391: [0]=>
1392: string(5) "fruit"
1393: [1]=>
1394: string(0) ""
1395: }
1396: int(16)
1397: bool(false)
1398:
1399: -- Testing fgetcsv() with file opened using a+t mode --
1400: array(1) {
1401: [0]=>
1402: string(6) "water="
1403: }
1404: int(9)
1405: bool(false)
1406: array(2) {
1407: [0]=>
1408: string(5) "fruit"
1409: [1]=>
1410: string(0) ""
1411: }
1412: int(16)
1413: bool(false)
1414:
1415: -- Testing fgetcsv() with file opened using w+ mode --
1416: array(1) {
1417: [0]=>
1418: string(6) "water="
1419: }
1420: int(9)
1421: bool(false)
1422: array(2) {
1423: [0]=>
1424: string(5) "fruit"
1425: [1]=>
1426: string(0) ""
1427: }
1428: int(16)
1429: bool(false)
1430:
1431: -- Testing fgetcsv() with file opened using w+b mode --
1432: array(1) {
1433: [0]=>
1434: string(6) "water="
1435: }
1436: int(9)
1437: bool(false)
1438: array(2) {
1439: [0]=>
1440: string(5) "fruit"
1441: [1]=>
1442: string(0) ""
1443: }
1444: int(16)
1445: bool(false)
1446:
1447: -- Testing fgetcsv() with file opened using w+t mode --
1448: array(1) {
1449: [0]=>
1450: string(6) "water="
1451: }
1452: int(9)
1453: bool(false)
1454: array(2) {
1455: [0]=>
1456: string(5) "fruit"
1457: [1]=>
1458: string(0) ""
1459: }
1460: int(16)
1461: bool(false)
1462:
1463: -- Testing fgetcsv() with file opened using x+ mode --
1464: array(1) {
1465: [0]=>
1466: string(6) "water="
1467: }
1468: int(9)
1469: bool(false)
1470: array(2) {
1471: [0]=>
1472: string(5) "fruit"
1473: [1]=>
1474: string(0) ""
1475: }
1476: int(16)
1477: bool(false)
1478:
1479: -- Testing fgetcsv() with file opened using x+b mode --
1480: array(1) {
1481: [0]=>
1482: string(6) "water="
1483: }
1484: int(9)
1485: bool(false)
1486: array(2) {
1487: [0]=>
1488: string(5) "fruit"
1489: [1]=>
1490: string(0) ""
1491: }
1492: int(16)
1493: bool(false)
1494:
1495: -- Testing fgetcsv() with file opened using x+t mode --
1496: array(1) {
1497: [0]=>
1498: string(6) "water="
1499: }
1500: int(9)
1501: bool(false)
1502: array(2) {
1503: [0]=>
1504: string(5) "fruit"
1505: [1]=>
1506: string(0) ""
1507: }
1508: int(16)
1509: bool(false)
1510:
1511: -- Testing fgetcsv() with file opened using r mode --
1512: array(1) {
1513: [0]=>
1514: string(14) "water-fruitair"
1515: }
1516: int(18)
1517: bool(false)
1518: array(1) {
1519: [0]=>
1520: string(39) "This is line of text without csv fields"
1521: }
1522: int(58)
1523: bool(false)
1524:
1525: -- Testing fgetcsv() with file opened using rb mode --
1526: array(1) {
1527: [0]=>
1528: string(14) "water-fruitair"
1529: }
1530: int(18)
1531: bool(false)
1532: array(1) {
1533: [0]=>
1534: string(39) "This is line of text without csv fields"
1535: }
1536: int(58)
1537: bool(false)
1538:
1539: -- Testing fgetcsv() with file opened using rt mode --
1540: array(1) {
1541: [0]=>
1542: string(14) "water-fruitair"
1543: }
1544: int(18)
1545: bool(false)
1546: array(1) {
1547: [0]=>
1548: string(39) "This is line of text without csv fields"
1549: }
1550: int(58)
1551: bool(false)
1552:
1553: -- Testing fgetcsv() with file opened using r+ mode --
1554: array(1) {
1555: [0]=>
1556: string(14) "water-fruitair"
1557: }
1558: int(18)
1559: bool(false)
1560: array(1) {
1561: [0]=>
1562: string(39) "This is line of text without csv fields"
1563: }
1564: int(58)
1565: bool(false)
1566:
1567: -- Testing fgetcsv() with file opened using r+b mode --
1568: array(1) {
1569: [0]=>
1570: string(14) "water-fruitair"
1571: }
1572: int(18)
1573: bool(false)
1574: array(1) {
1575: [0]=>
1576: string(39) "This is line of text without csv fields"
1577: }
1578: int(58)
1579: bool(false)
1580:
1581: -- Testing fgetcsv() with file opened using r+t mode --
1582: array(1) {
1583: [0]=>
1584: string(14) "water-fruitair"
1585: }
1586: int(18)
1587: bool(false)
1588: array(1) {
1589: [0]=>
1590: string(39) "This is line of text without csv fields"
1591: }
1592: int(58)
1593: bool(false)
1594:
1595: -- Testing fgetcsv() with file opened using a+ mode --
1596: array(1) {
1597: [0]=>
1598: string(14) "water-fruitair"
1599: }
1600: int(18)
1601: bool(false)
1602: array(1) {
1603: [0]=>
1604: string(39) "This is line of text without csv fields"
1605: }
1606: int(58)
1607: bool(false)
1608:
1609: -- Testing fgetcsv() with file opened using a+b mode --
1610: array(1) {
1611: [0]=>
1612: string(14) "water-fruitair"
1613: }
1614: int(18)
1615: bool(false)
1616: array(1) {
1617: [0]=>
1618: string(39) "This is line of text without csv fields"
1619: }
1620: int(58)
1621: bool(false)
1622:
1623: -- Testing fgetcsv() with file opened using a+t mode --
1624: array(1) {
1625: [0]=>
1626: string(14) "water-fruitair"
1627: }
1628: int(18)
1629: bool(false)
1630: array(1) {
1631: [0]=>
1632: string(39) "This is line of text without csv fields"
1633: }
1634: int(58)
1635: bool(false)
1636:
1637: -- Testing fgetcsv() with file opened using w+ mode --
1638: array(1) {
1639: [0]=>
1640: string(14) "water-fruitair"
1641: }
1642: int(18)
1643: bool(false)
1644: array(1) {
1645: [0]=>
1646: string(39) "This is line of text without csv fields"
1647: }
1648: int(58)
1649: bool(false)
1650:
1651: -- Testing fgetcsv() with file opened using w+b mode --
1652: array(1) {
1653: [0]=>
1654: string(14) "water-fruitair"
1655: }
1656: int(18)
1657: bool(false)
1658: array(1) {
1659: [0]=>
1660: string(39) "This is line of text without csv fields"
1661: }
1662: int(58)
1663: bool(false)
1664:
1665: -- Testing fgetcsv() with file opened using w+t mode --
1666: array(1) {
1667: [0]=>
1668: string(14) "water-fruitair"
1669: }
1670: int(18)
1671: bool(false)
1672: array(1) {
1673: [0]=>
1674: string(39) "This is line of text without csv fields"
1675: }
1676: int(58)
1677: bool(false)
1678:
1679: -- Testing fgetcsv() with file opened using x+ mode --
1680: array(1) {
1681: [0]=>
1682: string(14) "water-fruitair"
1683: }
1684: int(18)
1685: bool(false)
1686: array(1) {
1687: [0]=>
1688: string(39) "This is line of text without csv fields"
1689: }
1690: int(58)
1691: bool(false)
1692:
1693: -- Testing fgetcsv() with file opened using x+b mode --
1694: array(1) {
1695: [0]=>
1696: string(14) "water-fruitair"
1697: }
1698: int(18)
1699: bool(false)
1700: array(1) {
1701: [0]=>
1702: string(39) "This is line of text without csv fields"
1703: }
1704: int(58)
1705: bool(false)
1706:
1707: -- Testing fgetcsv() with file opened using x+t mode --
1708: array(1) {
1709: [0]=>
1710: string(14) "water-fruitair"
1711: }
1712: int(18)
1713: bool(false)
1714: array(1) {
1715: [0]=>
1716: string(39) "This is line of text without csv fields"
1717: }
1718: int(58)
1719: bool(false)
1720:
1721: -- Testing fgetcsv() with file opened using r mode --
1722: array(1) {
1723: [0]=>
1724: string(6) "water-"
1725: }
1726: int(9)
1727: bool(false)
1728: array(3) {
1729: [0]=>
1730: string(5) "fruit"
1731: [1]=>
1732: string(3) "air"
1733: [2]=>
1734: string(0) ""
1735: }
1736: int(22)
1737: bool(false)
1738:
1739: -- Testing fgetcsv() with file opened using rb mode --
1740: array(1) {
1741: [0]=>
1742: string(6) "water-"
1743: }
1744: int(9)
1745: bool(false)
1746: array(3) {
1747: [0]=>
1748: string(5) "fruit"
1749: [1]=>
1750: string(3) "air"
1751: [2]=>
1752: string(0) ""
1753: }
1754: int(22)
1755: bool(false)
1756:
1757: -- Testing fgetcsv() with file opened using rt mode --
1758: array(1) {
1759: [0]=>
1760: string(6) "water-"
1761: }
1762: int(9)
1763: bool(false)
1764: array(3) {
1765: [0]=>
1766: string(5) "fruit"
1767: [1]=>
1768: string(3) "air"
1769: [2]=>
1770: string(0) ""
1771: }
1772: int(22)
1773: bool(false)
1774:
1775: -- Testing fgetcsv() with file opened using r+ mode --
1776: array(1) {
1777: [0]=>
1778: string(6) "water-"
1779: }
1780: int(9)
1781: bool(false)
1782: array(3) {
1783: [0]=>
1784: string(5) "fruit"
1785: [1]=>
1786: string(3) "air"
1787: [2]=>
1788: string(0) ""
1789: }
1790: int(22)
1791: bool(false)
1792:
1793: -- Testing fgetcsv() with file opened using r+b mode --
1794: array(1) {
1795: [0]=>
1796: string(6) "water-"
1797: }
1798: int(9)
1799: bool(false)
1800: array(3) {
1801: [0]=>
1802: string(5) "fruit"
1803: [1]=>
1804: string(3) "air"
1805: [2]=>
1806: string(0) ""
1807: }
1808: int(22)
1809: bool(false)
1810:
1811: -- Testing fgetcsv() with file opened using r+t mode --
1812: array(1) {
1813: [0]=>
1814: string(6) "water-"
1815: }
1816: int(9)
1817: bool(false)
1818: array(3) {
1819: [0]=>
1820: string(5) "fruit"
1821: [1]=>
1822: string(3) "air"
1823: [2]=>
1824: string(0) ""
1825: }
1826: int(22)
1827: bool(false)
1828:
1829: -- Testing fgetcsv() with file opened using a+ mode --
1830: array(1) {
1831: [0]=>
1832: string(6) "water-"
1833: }
1834: int(9)
1835: bool(false)
1836: array(3) {
1837: [0]=>
1838: string(5) "fruit"
1839: [1]=>
1840: string(3) "air"
1841: [2]=>
1842: string(0) ""
1843: }
1844: int(22)
1845: bool(false)
1846:
1847: -- Testing fgetcsv() with file opened using a+b mode --
1848: array(1) {
1849: [0]=>
1850: string(6) "water-"
1851: }
1852: int(9)
1853: bool(false)
1854: array(3) {
1855: [0]=>
1856: string(5) "fruit"
1857: [1]=>
1858: string(3) "air"
1859: [2]=>
1860: string(0) ""
1861: }
1862: int(22)
1863: bool(false)
1864:
1865: -- Testing fgetcsv() with file opened using a+t mode --
1866: array(1) {
1867: [0]=>
1868: string(6) "water-"
1869: }
1870: int(9)
1871: bool(false)
1872: array(3) {
1873: [0]=>
1874: string(5) "fruit"
1875: [1]=>
1876: string(3) "air"
1877: [2]=>
1878: string(0) ""
1879: }
1880: int(22)
1881: bool(false)
1882:
1883: -- Testing fgetcsv() with file opened using w+ mode --
1884: array(1) {
1885: [0]=>
1886: string(6) "water-"
1887: }
1888: int(9)
1889: bool(false)
1890: array(3) {
1891: [0]=>
1892: string(5) "fruit"
1893: [1]=>
1894: string(3) "air"
1895: [2]=>
1896: string(0) ""
1897: }
1898: int(22)
1899: bool(false)
1900:
1901: -- Testing fgetcsv() with file opened using w+b mode --
1902: array(1) {
1903: [0]=>
1904: string(6) "water-"
1905: }
1906: int(9)
1907: bool(false)
1908: array(3) {
1909: [0]=>
1910: string(5) "fruit"
1911: [1]=>
1912: string(3) "air"
1913: [2]=>
1914: string(0) ""
1915: }
1916: int(22)
1917: bool(false)
1918:
1919: -- Testing fgetcsv() with file opened using w+t mode --
1920: array(1) {
1921: [0]=>
1922: string(6) "water-"
1923: }
1924: int(9)
1925: bool(false)
1926: array(3) {
1927: [0]=>
1928: string(5) "fruit"
1929: [1]=>
1930: string(3) "air"
1931: [2]=>
1932: string(0) ""
1933: }
1934: int(22)
1935: bool(false)
1936:
1937: -- Testing fgetcsv() with file opened using x+ mode --
1938: array(1) {
1939: [0]=>
1940: string(6) "water-"
1941: }
1942: int(9)
1943: bool(false)
1944: array(3) {
1945: [0]=>
1946: string(5) "fruit"
1947: [1]=>
1948: string(3) "air"
1949: [2]=>
1950: string(0) ""
1951: }
1952: int(22)
1953: bool(false)
1954:
1955: -- Testing fgetcsv() with file opened using x+b mode --
1956: array(1) {
1957: [0]=>
1958: string(6) "water-"
1959: }
1960: int(9)
1961: bool(false)
1962: array(3) {
1963: [0]=>
1964: string(5) "fruit"
1965: [1]=>
1966: string(3) "air"
1967: [2]=>
1968: string(0) ""
1969: }
1970: int(22)
1971: bool(false)
1972:
1973: -- Testing fgetcsv() with file opened using x+t mode --
1974: array(1) {
1975: [0]=>
1976: string(6) "water-"
1977: }
1978: int(9)
1979: bool(false)
1980: array(3) {
1981: [0]=>
1982: string(5) "fruit"
1983: [1]=>
1984: string(3) "air"
1985: [2]=>
1986: string(0) ""
1987: }
1988: int(22)
1989: bool(false)
1990:
1991: -- Testing fgetcsv() with file opened using r mode --
1992: array(6) {
1993: [0]=>
1994: string(4) """"""
1995: [1]=>
1996: string(1) """
1997: [2]=>
1998: string(1) ","
1999: [3]=>
2000: string(1) """
2001: [4]=>
2002: string(1) ","
2003: [5]=>
2004: string(4) ",,,,"
2005: }
2006: int(24)
2007: bool(false)
2008: array(1) {
2009: [0]=>
2010: string(39) "This is line of text without csv fields"
2011: }
2012: int(64)
2013: bool(false)
2014:
2015: -- Testing fgetcsv() with file opened using rb mode --
2016: array(6) {
2017: [0]=>
2018: string(4) """"""
2019: [1]=>
2020: string(1) """
2021: [2]=>
2022: string(1) ","
2023: [3]=>
2024: string(1) """
2025: [4]=>
2026: string(1) ","
2027: [5]=>
2028: string(4) ",,,,"
2029: }
2030: int(24)
2031: bool(false)
2032: array(1) {
2033: [0]=>
2034: string(39) "This is line of text without csv fields"
2035: }
2036: int(64)
2037: bool(false)
2038:
2039: -- Testing fgetcsv() with file opened using rt mode --
2040: array(6) {
2041: [0]=>
2042: string(4) """"""
2043: [1]=>
2044: string(1) """
2045: [2]=>
2046: string(1) ","
2047: [3]=>
2048: string(1) """
2049: [4]=>
2050: string(1) ","
2051: [5]=>
2052: string(4) ",,,,"
2053: }
2054: int(24)
2055: bool(false)
2056: array(1) {
2057: [0]=>
2058: string(39) "This is line of text without csv fields"
2059: }
2060: int(64)
2061: bool(false)
2062:
2063: -- Testing fgetcsv() with file opened using r+ mode --
2064: array(6) {
2065: [0]=>
2066: string(4) """"""
2067: [1]=>
2068: string(1) """
2069: [2]=>
2070: string(1) ","
2071: [3]=>
2072: string(1) """
2073: [4]=>
2074: string(1) ","
2075: [5]=>
2076: string(4) ",,,,"
2077: }
2078: int(24)
2079: bool(false)
2080: array(1) {
2081: [0]=>
2082: string(39) "This is line of text without csv fields"
2083: }
2084: int(64)
2085: bool(false)
2086:
2087: -- Testing fgetcsv() with file opened using r+b mode --
2088: array(6) {
2089: [0]=>
2090: string(4) """"""
2091: [1]=>
2092: string(1) """
2093: [2]=>
2094: string(1) ","
2095: [3]=>
2096: string(1) """
2097: [4]=>
2098: string(1) ","
2099: [5]=>
2100: string(4) ",,,,"
2101: }
2102: int(24)
2103: bool(false)
2104: array(1) {
2105: [0]=>
2106: string(39) "This is line of text without csv fields"
2107: }
2108: int(64)
2109: bool(false)
2110:
2111: -- Testing fgetcsv() with file opened using r+t mode --
2112: array(6) {
2113: [0]=>
2114: string(4) """"""
2115: [1]=>
2116: string(1) """
2117: [2]=>
2118: string(1) ","
2119: [3]=>
2120: string(1) """
2121: [4]=>
2122: string(1) ","
2123: [5]=>
2124: string(4) ",,,,"
2125: }
2126: int(24)
2127: bool(false)
2128: array(1) {
2129: [0]=>
2130: string(39) "This is line of text without csv fields"
2131: }
2132: int(64)
2133: bool(false)
2134:
2135: -- Testing fgetcsv() with file opened using a+ mode --
2136: array(6) {
2137: [0]=>
2138: string(4) """"""
2139: [1]=>
2140: string(1) """
2141: [2]=>
2142: string(1) ","
2143: [3]=>
2144: string(1) """
2145: [4]=>
2146: string(1) ","
2147: [5]=>
2148: string(4) ",,,,"
2149: }
2150: int(24)
2151: bool(false)
2152: array(1) {
2153: [0]=>
2154: string(39) "This is line of text without csv fields"
2155: }
2156: int(64)
2157: bool(false)
2158:
2159: -- Testing fgetcsv() with file opened using a+b mode --
2160: array(6) {
2161: [0]=>
2162: string(4) """"""
2163: [1]=>
2164: string(1) """
2165: [2]=>
2166: string(1) ","
2167: [3]=>
2168: string(1) """
2169: [4]=>
2170: string(1) ","
2171: [5]=>
2172: string(4) ",,,,"
2173: }
2174: int(24)
2175: bool(false)
2176: array(1) {
2177: [0]=>
2178: string(39) "This is line of text without csv fields"
2179: }
2180: int(64)
2181: bool(false)
2182:
2183: -- Testing fgetcsv() with file opened using a+t mode --
2184: array(6) {
2185: [0]=>
2186: string(4) """"""
2187: [1]=>
2188: string(1) """
2189: [2]=>
2190: string(1) ","
2191: [3]=>
2192: string(1) """
2193: [4]=>
2194: string(1) ","
2195: [5]=>
2196: string(4) ",,,,"
2197: }
2198: int(24)
2199: bool(false)
2200: array(1) {
2201: [0]=>
2202: string(39) "This is line of text without csv fields"
2203: }
2204: int(64)
2205: bool(false)
2206:
2207: -- Testing fgetcsv() with file opened using w+ mode --
2208: array(6) {
2209: [0]=>
2210: string(4) """"""
2211: [1]=>
2212: string(1) """
2213: [2]=>
2214: string(1) ","
2215: [3]=>
2216: string(1) """
2217: [4]=>
2218: string(1) ","
2219: [5]=>
2220: string(4) ",,,,"
2221: }
2222: int(24)
2223: bool(false)
2224: array(1) {
2225: [0]=>
2226: string(39) "This is line of text without csv fields"
2227: }
2228: int(64)
2229: bool(false)
2230:
2231: -- Testing fgetcsv() with file opened using w+b mode --
2232: array(6) {
2233: [0]=>
2234: string(4) """"""
2235: [1]=>
2236: string(1) """
2237: [2]=>
2238: string(1) ","
2239: [3]=>
2240: string(1) """
2241: [4]=>
2242: string(1) ","
2243: [5]=>
2244: string(4) ",,,,"
2245: }
2246: int(24)
2247: bool(false)
2248: array(1) {
2249: [0]=>
2250: string(39) "This is line of text without csv fields"
2251: }
2252: int(64)
2253: bool(false)
2254:
2255: -- Testing fgetcsv() with file opened using w+t mode --
2256: array(6) {
2257: [0]=>
2258: string(4) """"""
2259: [1]=>
2260: string(1) """
2261: [2]=>
2262: string(1) ","
2263: [3]=>
2264: string(1) """
2265: [4]=>
2266: string(1) ","
2267: [5]=>
2268: string(4) ",,,,"
2269: }
2270: int(24)
2271: bool(false)
2272: array(1) {
2273: [0]=>
2274: string(39) "This is line of text without csv fields"
2275: }
2276: int(64)
2277: bool(false)
2278:
2279: -- Testing fgetcsv() with file opened using x+ mode --
2280: array(6) {
2281: [0]=>
2282: string(4) """"""
2283: [1]=>
2284: string(1) """
2285: [2]=>
2286: string(1) ","
2287: [3]=>
2288: string(1) """
2289: [4]=>
2290: string(1) ","
2291: [5]=>
2292: string(4) ",,,,"
2293: }
2294: int(24)
2295: bool(false)
2296: array(1) {
2297: [0]=>
2298: string(39) "This is line of text without csv fields"
2299: }
2300: int(64)
2301: bool(false)
2302:
2303: -- Testing fgetcsv() with file opened using x+b mode --
2304: array(6) {
2305: [0]=>
2306: string(4) """"""
2307: [1]=>
2308: string(1) """
2309: [2]=>
2310: string(1) ","
2311: [3]=>
2312: string(1) """
2313: [4]=>
2314: string(1) ","
2315: [5]=>
2316: string(4) ",,,,"
2317: }
2318: int(24)
2319: bool(false)
2320: array(1) {
2321: [0]=>
2322: string(39) "This is line of text without csv fields"
2323: }
2324: int(64)
2325: bool(false)
2326:
2327: -- Testing fgetcsv() with file opened using x+t mode --
2328: array(6) {
2329: [0]=>
2330: string(4) """"""
2331: [1]=>
2332: string(1) """
2333: [2]=>
2334: string(1) ","
2335: [3]=>
2336: string(1) """
2337: [4]=>
2338: string(1) ","
2339: [5]=>
2340: string(4) ",,,,"
2341: }
2342: int(24)
2343: bool(false)
2344: array(1) {
2345: [0]=>
2346: string(39) "This is line of text without csv fields"
2347: }
2348: int(64)
2349: bool(false)
2350: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>