Annotation of embedaddon/php/ext/standard/tests/strings/bug55674.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #55674 (fgetcsv & str_getcsv skip empty fields in some tab-separated records)
3: --FILE--
4: <?php
5: var_dump(str_getcsv("0\t\t\"2\"\n", "\t"));
6: var_dump(str_getcsv("0\t \t'2'\n", "\t", "'"));
7: var_dump(str_getcsv(",,,,"));
8: var_dump(str_getcsv(" \t \t\t\t ", "\t"));
9: ?>
10: --EXPECT--
11: array(3) {
12: [0]=>
13: string(1) "0"
14: [1]=>
15: string(0) ""
16: [2]=>
17: string(1) "2"
18: }
19: array(3) {
20: [0]=>
21: string(1) "0"
22: [1]=>
23: string(1) " "
24: [2]=>
25: string(1) "2"
26: }
27: array(5) {
28: [0]=>
29: string(0) ""
30: [1]=>
31: string(0) ""
32: [2]=>
33: string(0) ""
34: [3]=>
35: string(0) ""
36: [4]=>
37: string(0) ""
38: }
39: array(5) {
40: [0]=>
41: string(1) " "
42: [1]=>
43: string(2) " "
44: [2]=>
45: string(0) ""
46: [3]=>
47: string(0) ""
48: [4]=>
49: string(1) " "
50: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>