diff options
Diffstat (limited to 'ext/spl/tests/SplFileObject_fputcsv_variation5.phpt')
-rw-r--r-- | ext/spl/tests/SplFileObject_fputcsv_variation5.phpt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt b/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt index 9c4c01f54f..4b9e930c7c 100644 --- a/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt +++ b/ext/spl/tests/SplFileObject_fputcsv_variation5.phpt @@ -7,8 +7,8 @@ Test fputcsv() : usage variations - with default arguments value echo "*** Testing fputcsv() : with default arguments value ***\n"; -/* the array is with three elements in it. Each element should be read as - 1st element is delimiter, 2nd element is enclosure +/* the array is with three elements in it. Each element should be read as + 1st element is delimiter, 2nd element is enclosure and 3rd element is csv fields */ $csv_lists = array ( @@ -29,13 +29,13 @@ $file = "$file_path/fputcsv_variation5.tmp"; $file_modes = array ("r+", "r+b", "r+t", "a+", "a+b", "a+t", "w+", "w+b", "w+t", - "x+", "x+b", "x+t"); + "x+", "x+b", "x+t"); $loop_counter = 1; foreach ($csv_lists as $csv_list) { for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) { - - echo "\n-- file opened in $file_modes[$mode_counter] --\n"; + + echo "\n-- file opened in $file_modes[$mode_counter] --\n"; // create the file and add the content with has csv fields if ( strstr($file_modes[$mode_counter], "r") ) { $fo = new SplFileObject($file, 'w'); @@ -45,7 +45,7 @@ foreach ($csv_lists as $csv_list) { $delimiter = $csv_list[0]; $enclosure = $csv_list[1]; $csv_field = $csv_list[2]; - + // write to a file in csv format var_dump( $fo->fputcsv($csv_field) ); // check the file pointer position and eof @@ -53,13 +53,13 @@ foreach ($csv_lists as $csv_list) { var_dump( $fo->eof() ); //close the file unset($fo); - - // print the file contents + + // print the file contents var_dump( file_get_contents($file) ); //delete file unlink($file); - } //end of mode loop + } //end of mode loop } // end of foreach echo "Done\n"; |