ID:               42202
 Updated by:       [EMAIL PROTECTED]
 Reported By:      nikhil dot gupta at in dot ibm dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Linux, Windows
 PHP Version:      5CVS-2007-08-03 (CVS)
 New Comment:

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.

"fputcsv() formats a line as CSV and write it (terminated by a newline)
to the specified file"


Previous Comments:
------------------------------------------------------------------------

[2007-08-04 14:10:25] [EMAIL PROTECTED]

This is the correct behaviour. Reclassified as docu bug.

------------------------------------------------------------------------

[2007-08-03 12:13:34] nikhil dot gupta at in dot ibm dot com

Description:
------------
fputcsv() inserts a newline character at the end of string. This
behaviour is not seen in the documentation. This happens for both php5
and php6 on windows as well as on RHEL.

Reproduce code:
---------------
<?php
$list = array ('aaa,bbb');
$fp = fopen("file.tmp", 'w');
var_dump(fputcsv($fp, $list));
var_dump( filesize("file.tmp") );
var_dump( file_get_contents("file.tmp") );
fclose($fp);
?> 


Expected result:
----------------
int(9)
int(9)
string(9) ""aaa,bbb""


Actual result:
--------------
int(10)
int(10)
string(10) ""aaa,bbb"
"



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42202&edit=1

Reply via email to