From:
Operating system: windows
PHP version: Irrelevant
Package: Streams related
Bug Type: Bug
Bug description:[fputcsv] cast string to int
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 bug report at http://bugs.php.net/bug.php?id=51954&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51954&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51954&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=51954&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=51954&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51954&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51954&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51954&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51954&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51954&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51954&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51954&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51954&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51954&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51954&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51954&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51954&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51954&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51954&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51954&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51954&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51954&r=mysqlcfg