diff options
Diffstat (limited to 'ext/standard/tests/file/fread_variation4-win32.phpt')
-rw-r--r-- | ext/standard/tests/file/fread_variation4-win32.phpt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/tests/file/fread_variation4-win32.phpt b/ext/standard/tests/file/fread_variation4-win32.phpt index 77d733a50e..288dcfc66c 100644 --- a/ext/standard/tests/file/fread_variation4-win32.phpt +++ b/ext/standard/tests/file/fread_variation4-win32.phpt @@ -10,9 +10,9 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { <?php /* Prototype: string fread ( resource $handle [, int $length] ); - Description: reads up to length bytes from the file pointer referenced by handle. - Reading stops when up to length bytes have been read, EOF (end of file) is - reached, (for network streams) when a packet becomes available, or (after + Description: reads up to length bytes from the file pointer referenced by handle. + Reading stops when up to length bytes have been read, EOF (end of file) is + reached, (for network streams) when a packet becomes available, or (after opening userspace stream) when 8192 bytes have been read whichever comes first. */ @@ -20,8 +20,8 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { include ("file.inc"); /* Function : function check_read(resource $file_handle, int $read_size, int $expect_size) - Description : Read data from file of size $read_size and verifies that $expected_size no. of - bytes are read. + Description : Read data from file of size $read_size and verifies that $expected_size no. of + bytes are read. $file_handle : File Handle $read_size : No. of bytes to be read. $expect_size : Expected data length @@ -31,7 +31,7 @@ function check_read($file_handle, $read_size, $expect_size) { // print file pointer position before read var_dump( ftell($file_handle) ); var_dump( feof($file_handle) ); - + // read the data of size $read_size echo "Reading $read_size bytes from file, expecting $expect_size bytes ... "; $data_from_file = fread($file_handle, $read_size); @@ -49,7 +49,7 @@ function check_read($file_handle, $read_size, $expect_size) { return $data_from_file; } - + echo "*** Testing fread() : usage variations ***\n"; $file_modes = array("a","ab","at", @@ -67,7 +67,7 @@ foreach($file_content_types as $file_content_type) { /* create files with $file_content_type */ create_files ( dirname(__FILE__), 1, $file_content_type, 0755, 1, "w", "fread_variation", 4); } - + $filename = dirname(__FILE__)."/fread_variation4.tmp"; // this is name of the file created by create_files() echo "-- File opened in mode ".$file_mode." --\n"; $file_handle = fopen($filename, $file_mode); |