Bug #51954 [Fbk->Csd]: [fputcsv] cast string to int
| From: | felipe@php.net | Date: | Sun, 08 Aug 2010 23:11:18 +0000 |
| Subject: | Bug #51954 [Fbk->Csd]: [fputcsv] cast string to int | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153253@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: felipe@php.net
Reported by: ph dot ausseil at gmail dot com
Summary: [fputcsv] cast string to int
-Status: Feedback
+Status: Closed
Type: Bug
Package: Streams related
Operating System: windows
PHP Version: Irrelevant
-Assigned To:
+Assigned To: felipe
Block user comment: N
New Comment:
I got "0123456" on 5.3.3. Closed.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2010-05-31 15:00:44] mike@php.net
Please try using this snapshot:
http://snaps.php.net/php5.3-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
works fine here.
------------------------------------------------------------------------
[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