Return to bug40501.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / file |
1.1 misho 1: --TEST-- 2: Bug #40501 (fgetcsv() can't handle trailing odd number of backslashes) 3: --FILE-- 4: <?php 5: $file = dirname(__FILE__).'/bug40501.csv'; 6: 7: $h = fopen($file, 'r'); 8: $data = fgetcsv($h, NULL, ',', '"', '"'); 9: fclose($h); 10: 11: var_dump($data); 12: ?> 13: --EXPECTF-- 14: array(2) { 15: [0]=> 16: string(%d) "this element contains the delimiter, and ends with an odd number of 17: backslashes (ex: 1)\" 18: [1]=> 19: string(%d) "and it isn't the last element$" 20: }