|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-01 14:35 UTC] nikhil dot gupta at in dot ibm dot com
[2007-08-06 13:14 UTC] nikhil dot gupta at in dot ibm dot com
[2008-02-05 15:44 UTC] msaraujo@php.net
[2008-02-06 02:58 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 18:00:01 2025 UTC |
Description: ------------ fgetcsv() gives different output on php6 compared to php6 on linux. Reproduce code: --------------- <?php $filename = dirname(__FILE__) . '/fgetcsv1.tmp'; $file_handle = fopen($filename, "w+" ); $delimiter = '\\'; $csv_field = 'water\\"fruit"\\"air"'; fwrite($file_handle, $csv_field . "\n"); rewind($file_handle); var_dump( fgetcsv($file_handle, 1024, $delimiter ) ); // close the file fclose($file_handle); //delete file unlink($filename); ?> Expected result: ---------------- according to php5 the output is: array(3) { [0]=> string(5) "water" [1]=> string(5) "fruit" [2]=> string(3) "air" } Actual result: -------------- Output on php6 is: array(1) { [0]=> string(19) "water\"fruit"\"air"" }