Home
last modified time | relevance | path

Searched refs:file_handle (Results 26 – 50 of 361) sorted by relevance

12345678910>>...15

/PHP-7.4/ext/standard/tests/file/
H A D007_variation9.phpt30 $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
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 Dstat_variation8-win32.phpt27 $file_handle = fopen($filename, "w"); // temp file
28 fclose($file_handle);
34 $file_handle = fopen($filename, "w");
35 fclose($file_handle);
43 $file_handle = fopen($filename, "r+");
44 var_dump( ftruncate($file_handle, 512) ); // truncate it
45 fclose($file_handle);
H A D007_variation14.phpt30 $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 D007_variation22.phpt30 $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 D007_variation4.phpt31 $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 Dfflush_basic.phpt20 $file_handle = fopen($filename, "w");
21 if($file_handle == false)
29 var_dump( fwrite($file_handle, $data) );
30 var_dump( fflush($file_handle) );
34 $return_value = fflush($file_handle);
36 fclose($file_handle);
H A Dfscanf_variation35.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
40 @fprintf($file_handle, $value);
41 @fprintf($file_handle, "\n");
44 fclose($file_handle);
47 $file_handle = fopen($filename, "r");
48 if($file_handle == false) {
56 rewind($file_handle);
58 while( !feof($file_handle) ) {
59 var_dump( fscanf($file_handle,$hexa_format) );
H A Dfscanf_variation4.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
41 @fprintf($file_handle, $value);
42 @fprintf($file_handle, "\n");
45 fclose($file_handle);
48 $file_handle = fopen($filename, "r");
49 if($file_handle == false) {
57 rewind($file_handle);
59 while( !feof($file_handle) ) {
60 var_dump( fscanf($file_handle,$int_format) );
H A Dfscanf_variation47.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
40 @fprintf($file_handle, $value);
41 @fprintf($file_handle, "\n");
44 fclose($file_handle);
47 $file_handle = fopen($filename, "r");
48 if($file_handle == false) {
56 rewind($file_handle);
58 while( !feof($file_handle) ) {
59 var_dump( fscanf($file_handle,$scientific_format) );
H A Dfscanf_variation10.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
45 @fprintf($file_handle, $value);
46 @fprintf($file_handle, "\n");
49 fclose($file_handle);
52 $file_handle = fopen($filename, "r");
53 if($file_handle == false) {
61 rewind($file_handle);
63 while( !feof($file_handle) ) {
64 var_dump( fscanf($file_handle,$float_format) );
H A Dfscanf_variation29.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
45 @fprintf($file_handle, $value);
46 @fprintf($file_handle, "\n");
49 fclose($file_handle);
52 $file_handle = fopen($filename, "r");
53 if($file_handle == false) {
61 rewind($file_handle);
63 while( !feof($file_handle) ) {
64 var_dump( fscanf($file_handle,$octal_format) );
H A Dfscanf_variation41.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
40 @fprintf($file_handle, $value);
41 @fprintf($file_handle, "\n");
44 fclose($file_handle);
47 $file_handle = fopen($filename, "r");
48 if($file_handle == false) {
56 rewind($file_handle);
58 while( !feof($file_handle) ) {
59 var_dump( fscanf($file_handle,$unsigned_format) );
H A D007_variation13-win32.phpt35 $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: false
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 D007_variation13.phpt35 $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: false
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 D007_variation21.phpt30 $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: false
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 D007_variation5.phpt30 $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: false
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 Dfgetc_variation1.phpt26 $file_handle = fopen ($filename, $file_modes[$loop_counter]);
27 if (!$file_handle) {
33 var_dump( fseek($file_handle, 0, SEEK_END) ); // set file pointer to eof
34 var_dump( feof($file_handle) ); // expected false
35 var_dump( ftell($file_handle) ); // ensure that file pointer is at eof
36 var_dump( fgetc($file_handle) ); // try n read a char, none expected
37 var_dump( feof($file_handle) ); // ensure that file pointer is at eof
38 var_dump( ftell($file_handle) ); // file pointer position
41 fclose($file_handle);
H A Dfgetcsv_variation14.phpt27 $file_handle = fopen($filename, "w");
31 if ( !$file_handle ) {
36 fwrite($file_handle, "\n"); // blank line
41 fclose($file_handle);
45 rewind($file_handle);
53 $fp_pos = ftell($file_handle);
56 var_dump( ftell($file_handle) );
57 var_dump( feof($file_handle) );
61 var_dump( ftell($file_handle) );
62 var_dump( feof($file_handle) );
[all …]
H A D007_variation11-win32-mb.phpt36 $file_handle = fopen($file, "wt"); //opening the file "wt" mode
37 var_dump($file_handle); //Check for the content of handle
38 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
39 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
40 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
41 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
42 rewind($file_handle);
43 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false
44 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the beg…
45 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation11-win32.phpt36 $file_handle = fopen($file, "wt"); //opening the file "wt" mode
37 var_dump($file_handle); //Check for the content of handle
38 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
39 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
40 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
41 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
42 rewind($file_handle);
43 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false
44 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the beg…
45 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation11.phpt36 $file_handle = fopen($file, "wt"); //opening the file "wt" mode
37 var_dump($file_handle); //Check for the content of handle
38 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
39 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
40 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
41 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
42 rewind($file_handle);
43 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false
44 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the beg…
45 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation12-win32.phpt36 $file_handle = fopen($file, "w+t"); //opening the file "w+t" mode
37 var_dump($file_handle); //Check for the content of handle
38 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
39 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
40 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
41 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
42 rewind($file_handle);
43 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file
44 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
45 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation12.phpt36 $file_handle = fopen($file, "w+t"); //opening the file "w+t" mode
37 var_dump($file_handle); //Check for the content of handle
38 var_dump( get_resource_type($file_handle) ); //Check for the type of resource
39 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the…
40 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t…
41 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en…
42 rewind($file_handle);
43 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file
44 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end…
45 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
[all …]
H A D007_variation19.phpt31 $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: false
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 D007_variation20.phpt31 $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 …]

Completed in 28 milliseconds

12345678910>>...15