blob: eacf11096962f2ea103b15831ca0a60ef2ee15d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--TEST--
Bug #53848 (fgetcsv removes leading spaces from fields)
--FILE--
<?php
$file = __DIR__ . "/bug39538.csv";
@unlink($file);
file_put_contents($file, "a,b\n c, d");
$fp = fopen($file, "r");
while ($l = fgetcsv($fp)) var_dump($l);
fclose($fp);
@unlink($file);
?>
--EXPECT--
array(2) {
[0]=>
string(1) "a"
[1]=>
string(1) "b"
}
array(2) {
[0]=>
string(3) " c"
[1]=>
string(3) " d"
}
|