From:             nikhil dot gupta at in dot ibm dot com
Operating system: Linux
PHP version:      6CVS-2007-08-01 (snap)
PHP Bug Type:     Filesystem function related
Bug description:  fgetcsv gives different output on php6 compared to php5

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""
}


-- 
Edit bug report at http://bugs.php.net/?id=42167&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=42167&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=42167&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=42167&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=42167&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=42167&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=42167&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=42167&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=42167&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=42167&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=42167&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=42167&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=42167&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=42167&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=42167&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=42167&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=42167&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=42167&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=42167&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=42167&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=42167&r=mysqlcfg

Reply via email to