/PHP-5.5/ext/standard/tests/file/ |
H A D | 007_variation13.phpt | 35 $file_handle = fopen($file, "at"); //opening the file "at" mode 36 var_dump($file_handle); //Check for the content of handle 37 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 38 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 39 rewind($file_handle); 40 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 41 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 42 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 43 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation14.phpt | 30 $file_handle = fopen($file, "a+t"); //opening the file "a+t" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation15.phpt | 28 $file_handle = fopen($file, "xt"); //opening the non-existing file in "xt" mode, file will be crea… 29 var_dump($file_handle); //Check for the content of handle 30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation [all …]
|
H A D | 007_variation16.phpt | 28 $file_handle = fopen($file, "x+t"); //opening the non-existing file in "x+t" mode, file will be cr… 29 var_dump($file_handle); //Check for the content of handle 30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the… 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation17.phpt | 30 $file_handle = fopen($file, "rb"); //opening the file in "rb" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( ftell($file_handle) ); //Initial position of file pointer 34 var_dump( fread($file_handle, 100) ); //Check for read operation 35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails; expected: 0 bytes 36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 37 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation18.phpt | 30 $file_handle = fopen($file, "r+b"); //opening the file in "r+b" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 34 var_dump( fread($file_handle, 100) ); //Check for read operation 35 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 36 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 37 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 38 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 39 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation19.phpt | 31 $file_handle = fopen($file, "wb"); //opening the file "wb" mode 32 var_dump($file_handle); //Check for the content of handle 33 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 34 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 36 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 37 rewind($file_handle); 38 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 39 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the beg… 40 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation2.phpt | 30 $file_handle = fopen($file, "r+"); //opening the file in "r+" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 34 var_dump( fread($file_handle, 100) ); //Check for read operation 35 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 36 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 37 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 38 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 39 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation20.phpt | 31 $file_handle = fopen($file, "w+b"); //opening the file "w+b" mode 32 var_dump($file_handle); //Check for the content of handle 33 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 34 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 36 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 37 rewind($file_handle); 38 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file 39 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 40 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation21.phpt | 30 $file_handle = fopen($file, "ab"); //opening the file "ab" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation22.phpt | 30 $file_handle = fopen($file, "a+b"); //opening the file "a+b" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation23.phpt | 28 $file_handle = fopen($file, "xb"); //opening the non-existing file in "xb" mode, file will be crea… 29 var_dump($file_handle); //Check for the content of handle 30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation [all …]
|
H A D | 007_variation24.phpt | 28 $file_handle = fopen($file, "x+b"); //opening the non-existing file in "x+b" mode, file will be cr… 29 var_dump($file_handle); //Check for the content of handle 30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the… 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation3.phpt | 31 $file_handle = fopen($file, "w"); //opening the file "w" mode 32 var_dump($file_handle); //Check for the content of handle 33 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 34 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 36 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 37 rewind($file_handle); 38 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 39 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the beg… 40 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation4.phpt | 31 $file_handle = fopen($file, "w+"); //opening the file "w+" mode 32 var_dump($file_handle); //Check for the content of handle 33 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 34 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 36 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 37 rewind($file_handle); 38 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file 39 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 40 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation5.phpt | 30 $file_handle = fopen($file, "a"); //opening the file "a" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation6.phpt | 30 $file_handle = fopen($file, "a+"); //opening the file "a+" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation7.phpt | 28 $file_handle = fopen($file, "x"); //opening the non-existing file in "x" mode, file will be created 29 var_dump($file_handle); //Check for the content of handle 30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: empty string 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 38 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation [all …]
|
H A D | 007_variation8.phpt | 28 $file_handle = fopen($file, "x+"); //opening the non-existing file in "x+" mode, file will be crea… 29 var_dump($file_handle); //Check for the content of handle 30 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 32 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 33 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 34 rewind($file_handle); 35 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the… 36 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation9.phpt | 30 $file_handle = fopen($file, "rt"); //opening the file in "rt" mode 31 var_dump($file_handle); //Check for the content of handle 32 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 33 var_dump( ftell($file_handle) ); //Initial position of file pointer 34 var_dump( fread($file_handle, 100) ); //Check for read operation 35 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails; expected: 0 bytes 36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 37 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | copy_variation1.phpt | 17 $file_handle = fopen($src_file_name, "w"); 18 fwrite( $file_handle, str_repeat(b"Hello2World...\n", 100) ); 19 fclose($file_handle);
|
H A D | copy_variation10.phpt | 16 $file_handle = fopen($file, "w"); 17 fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); 18 fclose($file_handle);
|
H A D | copy_variation11.phpt | 16 $file_handle = fopen($file, "w"); 17 fwrite($file_handle, str_repeat(b"Hello, world...", 20)); 18 fclose($file_handle);
|
H A D | copy_variation14.phpt | 17 $file_handle = fopen($file, "w"); 18 fwrite($file_handle, str_repeat(b"Hello2world...\n", 100)); 19 fclose($file_handle);
|
H A D | copy_variation15.phpt | 30 $file_handle = fopen($file, "w"); 31 fwrite($file_handle, str_repeat(b"Hello, world...", 20)); 32 fclose($file_handle);
|