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