diff options
Diffstat (limited to 'ext/standard/tests/file/fread_variation2.phpt')
-rw-r--r-- | ext/standard/tests/file/fread_variation2.phpt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/tests/file/fread_variation2.phpt b/ext/standard/tests/file/fread_variation2.phpt index 23813a6672..1dc87c537c 100644 --- a/ext/standard/tests/file/fread_variation2.phpt +++ b/ext/standard/tests/file/fread_variation2.phpt @@ -4,9 +4,9 @@ Test fread() function : usage variations - read some/all chars, write only mode <?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. */ @@ -16,8 +16,8 @@ Test fread() function : usage variations - read some/all chars, write only mode 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 @@ -27,7 +27,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); @@ -46,7 +46,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", |