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