HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: //opt/cloudlinux/alt-php54/root/usr/share/pear/test/File_CSV/tests/CSV/bug14118.phpt
--TEST--
File_CSV Test Case bug14118: Error with quoted fields and separators
--FILE--
<?php
// $Id: bug14118.phpt,v 1.3 2008/10/26 21:39:02 dufuz Exp $
require_once 'File/CSV.php';

$path = dirname(__FILE__) . '/bug14118.csv';
$config = File_CSV::discoverFormat($path);
echo 'fields count: ' . $config['fields'] . "\n";
while ($row = File_CSV::read($path, $config)) {
    print_r($row);
}
?>
--EXPECT--
fields count: 5
Array
(
    [0] => ENFB
    [1] => closed
    [2] => Oslo, Fornebu
    [3] => Airport
    [4] => 
)
Array
(
    [0] => ENFG
    [1] => medium_airport
    [2] => Leirin, Leirin
    [3] => Airport
    [4] => 
)