Doc #61048 [Opn]: fgetcsv() length of 0 DOES NOT mean unlimited maximum line length

From: Date: Fri, 10 Feb 2012 18:43:24 +0000
Subject: Doc #61048 [Opn]: fgetcsv() length of 0 DOES NOT mean unlimited maximum line length
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7919@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61048&edit=1 ID: 61048 User updated by: blajoie55 at gmail dot com Reported by: blajoie55 at gmail dot com -Summary: length of 0 DOES NOT mean unlimited maximum line length +Summary: fgetcsv() length of 0 DOES NOT mean unlimited maximum line length Status: Open Type: Documentation Problem Package: Documentation problem Operating System: Linux PHP Version: Irrelevant Block user comment: N Private report: N New Comment: updating summary Previous Comments: ------------------------------------------------------------------------ [2012-02-10 18:28:32] blajoie55 at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.fgetcsv#refsect1-function.fgetcsv- parameters --- The documentation states the following for the length parameter for fgetcsv(): "Must be greater than the longest line (in characters) to be found in the CSV file (allowing for trailing line-end characters). It became optional in PHP 5. Omitting this parameter (or setting it to 0 in PHP 5.0.4 and later) the maximum line length is not limited, which is slightly slower." This is wrong. I have a php 5.0.4 environment using fgetcsv() in a while loop as follows: fgetcsv($csvHandle, 0, self::DELIMITER); And the 0 does not put no limit on the max line length, instead the fgetcsv() call gets each individual character on the line in the file ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61048&edit=1

« previous php.doc.bugs (#7919) next »