|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #64183 Why no str_PUTcsv()?
Submitted: 2013-02-10 12:37 UTC Modified: 2021-09-19 04:22 UTC
Avg. Score:4.2 ± 0.8
Reproduced:25 of 25 (100.0%)
Same Version:10 (40.0%)
Same OS:15 (60.0%)
From: cstdenis at ctgameinfo dot com Assigned: cmb (profile)
Status: No Feedback Package: Strings related
PHP Version: 5.4.11 OS: n/a
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: cstdenis at ctgameinfo dot com
New email:
PHP Version: OS:


 [2013-02-10 12:37 UTC] cstdenis at ctgameinfo dot com
There is a fgetcsv(), fputcsv(), str_getcsv(), but str_putcsv() is missing. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-13 22:17 UTC] sunseb at live dot com
Yes, the PHP language need this feature ! :-)
 [2017-09-27 14:11 UTC]
function str_putcsv(
    array $fields,
    string $delimiter = ',', 
    string $enclosure = '"', 
    string $escape_char = '\\'
) {
    $stream = fopen('php://memory', 'w+');
    fputcsv($stream, $fields, $delimiter, $enclosure, $escape_char);
    return stream_get_contents($stream);
 [2021-09-09 11:03 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-09 11:03 UTC]
> Yes, the PHP language need this feature ! :-)

Why?  Just for the sake of providing a (possibly reasonable)
counterpart to an unreasonable str_getcsv() isn't a proper
argument.  Can anyone provide a use case where str_fputscsv()
would be helpful?
 [2021-09-19 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 01:01:28 2024 UTC