Bug #51954 [Opn->Fbk]: [fputcsv] cast string to int
| From: | mike@php.net | Date: | Mon, 31 May 2010 13:00:45 +0000 |
| Subject: | Bug #51954 [Opn->Fbk]: [fputcsv] cast string to int | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150957@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51954&edit=1
ID: 51954
Updated by: mike@php.net
Reported by: ph dot ausseil at gmail dot com
Summary: [fputcsv] cast string to int
-Status: Open
+Status: Feedback
Type: Bug
Package: Streams related
Operating System: windows
PHP Version: Irrelevant
New Comment:
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
works fine here.
Previous Comments:
------------------------------------------------------------------------
[2010-05-31 14:09:21] ph dot ausseil at gmail dot com
Description:
------------
numeric string begining by a zero are casted to int.
for example "0123456" will be output "123456" in the stream.
Test script:
---------------
$fp = fopen("php://memory", 'wrb+');
fputcsv($fp, array('0123456'), ';');
rewind($fp);
$stream = stream_get_contents($fp);
fclose($fp);
echo $stream;
Expected result:
----------------
Output : "0123456;\n"
Actual result:
--------------
"123456;\n"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51954&edit=1