1--TEST--
2SPL: SplFileObject::setCsvControl basic
3--CREDITS--
4Erwin Poeze <erwin.poeze at gmail.com>
5--FILE--
6<?php
7file_put_contents(
8    'csv_control_data_basic.csv',
9    <<<CDATA
10    'groene appelen'|10
11    'gele bananen'|20
12    'rode kersen'|30
13    CDATA
14);
15$s = new SplFileObject('csv_control_data_basic.csv');
16$s->setFlags(SplFileObject::READ_CSV);
17$s->setCsvControl('|', '\'', '');
18foreach ($s as $row) {
19    list($fruit, $quantity) = $row;
20    echo "$fruit : $quantity\n";
21}
22?>
23--CLEAN--
24<?php
25unlink('csv_control_data_basic.csv');
26?>
27--EXPECT--
28groene appelen : 10
29gele bananen : 20
30rode kersen : 30
31