1--TEST-- 2SplFileObject::fgetcsv default path 3--FILE-- 4<?php 5$fp = fopen('SplFileObject__fgetcsv1.csv', 'w+'); 6fputcsv( 7 $fp, 8 [ 9 'field1', 10 'field2', 11 'field3', 12 5, 13 ], 14 escape: '', 15); 16fclose($fp); 17 18$fo = new SplFileObject('SplFileObject__fgetcsv1.csv'); 19$fo->setCsvControl(escape: ''); 20var_dump($fo->fgetcsv()); 21?> 22--CLEAN-- 23<?php 24unlink('SplFileObject__fgetcsv1.csv'); 25?> 26--EXPECT-- 27array(4) { 28 [0]=> 29 string(6) "field1" 30 [1]=> 31 string(6) "field2" 32 [2]=> 33 string(6) "field3" 34 [3]=> 35 string(1) "5" 36} 37