php-src/ext/standard/tests/file/bug42229.phpt

22 lines
351 B
Plaintext
Raw Normal View History

2008-02-10 03:55:39 +00:00
--TEST--
Bug #42229 (fgetcsv() behaves differently for a file containing '\n' with php5 and php6)
--FILE--
<?php
$file = dirname(__FILE__) .'/filetest.tmp';
$csv_string = '\n';
$fp = fopen($file, "w+t");
fwrite($fp, $csv_string);
rewind($fp);
var_dump(fgetcsv($fp));
fclose($fp);
unlink($file);
?>
--EXPECT--
array(1) {
[0]=>
unicode(2) "\n"
}