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