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