diff options
Diffstat (limited to 'ext/standard/tests/file/fscanf_variation53.phpt')
-rw-r--r-- | ext/standard/tests/file/fscanf_variation53.phpt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/standard/tests/file/fscanf_variation53.phpt b/ext/standard/tests/file/fscanf_variation53.phpt index a553a96693..3cd273488d 100644 --- a/ext/standard/tests/file/fscanf_variation53.phpt +++ b/ext/standard/tests/file/fscanf_variation53.phpt @@ -1,5 +1,5 @@ --TEST-- -Test fscanf() function: usage variations - file pointer pointing to EOF +Test fscanf() function: usage variations - file pointer pointing to EOF --FILE-- <?php @@ -12,7 +12,7 @@ Test fscanf() function: usage variations - file pointer pointing to EOF $file_path = dirname(__FILE__); -echo "*** Test fscanf(): to read a file when file pointer is pointing to EOF ***\n"; +echo "*** Test fscanf(): to read a file when file pointer is pointing to EOF ***\n"; // various formats $formats = array( "%d", "%f", "%e", "%u", " %s", "%x", "%o"); @@ -28,16 +28,16 @@ $modes = array("r", "rb", "rt", "r+", "r+b", "r+t", $counter = 1; // reading the values from file using different integer formats foreach($modes as $mode) { - + // create an empty file $filename = "$file_path/fscanf_variation53.tmp"; $file_handle = fopen($filename, "w"); if($file_handle == false) exit("Error:failed to open file $filename"); - + //writing data to the file @fwrite($file_handle, "Sample text\n"); - + // writing a blank line @fwrite($file_handle, "\n"); @@ -50,14 +50,14 @@ foreach($modes as $mode) { exit("Error:failed to open file $filename"); } echo "\n-- iteration $counter --\n"; - + // current location var_dump( ftell($file_handle) ); - + // set the file pointer to eof var_dump( fseek($file_handle, 0, SEEK_END) ); - - // current location + + // current location var_dump( ftell($file_handle) ); foreach($formats as $format) { |