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