php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60878 Incorrect and Incomplete documentation for SplFileObject::fputcsv
Submitted: 2012-01-25 13:08 UTC Modified: 2012-04-26 21:22 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: sergiy dot sokolenko at gmail dot com Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2012-01-25 13:08 UTC] sergiy dot sokolenko at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/splfileobject.fputcsv#refsect1-splfileobject.fputcsv-description
---

1. Issue #1: incorrect proto

A $fields parameter is of type array, not string as it stated in the description:

  public int SplFileObject::fputcsv ( string $fields [, string $delimiter [, string $enclosure ]] )


The correct version is:

  public int SplFileObject::fputcsv ( array $fields [, string $delimiter [, string $enclosure]])

2. Issue #2: PHP version not specified

Some people may think it is already available in PHP 5.3, but fputcsv is only available for PHP 5.4.

Something like "(PHP 5 >= 5.4.x)" shall be added to the description.


3. Issue #3: Description and examples are not available

Because this method uses php.net/fputcsv internally, the description and examples may be just copied from there.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-25 13:40 UTC] salathe@php.net
-Assigned To: +Assigned To: salathe
 [2012-04-26 21:21 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=325467
Log: document SplFileObject::fputcsv() (doc #60878)
 [2012-04-26 21:22 UTC] salathe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2012-04-26 21:22 UTC] salathe@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 13:00:02 2026 UTC