Doc #69516 [Ana]: SplFileObject::fputcsv signature has changed
| From: | salathe@php.net | Date: | Thu, 23 Apr 2015 18:33:22 +0000 |
| Subject: | Doc #69516 [Ana]: SplFileObject::fputcsv signature has changed | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12241@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69516&edit=1
ID: 69516
Updated by: salathe@php.net
Reported by: bburnichon at gmail dot com
Summary: SplFileObject::fputcsv signature has changed
Status: Analyzed
Type: Documentation Problem
Package: SPL related
PHP Version: Irrelevant
-Assigned To:
+Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
Assigning to myself, since I made the change.
Previous Comments:
------------------------------------------------------------------------
[2015-04-23 18:22:44] cmb@php.net
The $escape was added in PHP 5.5.21[1] and PHP 5.6.5[2].
[1] <http://php.net/ChangeLog-5.php#5.5.21>
[2] <http://php.net/ChangeLog-5.php#5.6.5>
------------------------------------------------------------------------
[2015-04-23 17:29:35] bburnichon at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/splfileobject.fputcsv
---
On the page manual, the $escape part is not present. I don't know exactly at which version this
behavior appeared,
I have version 5.5.23 on my machine and the added parameter is already there.
After some research, this comes from https://bugs.php.net/bug.php?id=68479 and https://github.com/php/php-src/pull/912
Test script:
---------------
class MySplFileObject extends SplFileObject
{
public function fputcsv() {}
}
Expected result:
----------------
PHP Strict standards: Declaration of MySplFileObject::fputcsv() should be compatible with
SplFileObject::fputcsv($fields, $delimiter = NULL, $enclosure = NULL) in php shell code on line 4
Actual result:
--------------
PHP Strict standards: Declaration of MySplFileObject::fputcsv() should be compatible with
SplFileObject::fputcsv($fields, $delimiter = NULL, $enclosure = NULL, $escape = NULL) in php shell
code on line 4
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69516&edit=1