Home
last modified time | relevance | path

Searched refs:file_handle (Results 1 – 25 of 361) sorted by relevance

12345678910>>...15

/PHP-7.4/Zend/
H A Dzend_stream.c60 return file_handle->handle.stream.fsizer(file_handle->handle.stream.handle); in zend_stream_fsize()
120 if (file_handle->buf) { in zend_stream_fixup()
121 *buf = file_handle->buf; in zend_stream_fixup()
122 *len = file_handle->len; in zend_stream_fixup()
127 if (zend_stream_open(file_handle->filename, file_handle) == FAILURE) { in zend_stream_fixup()
138 file_handle->handle.stream.handle = file_handle->handle.fp; in zend_stream_fixup()
161 file_handle->buf = *buf; in zend_stream_fixup()
162 file_handle->len = size; in zend_stream_fixup()
194 memset(file_handle->buf + file_handle->len, 0, ZEND_MMAP_AHEAD); in zend_stream_fixup()
196 *buf = file_handle->buf; in zend_stream_fixup()
[all …]
H A Dzend_dtrace.c25 ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type);
44 ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type) in dtrace_compile_file() argument
47 DTRACE_COMPILE_FILE_ENTRY(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename); in dtrace_compile_file()
48 res = compile_file(file_handle, type); in dtrace_compile_file()
49 DTRACE_COMPILE_FILE_RETURN(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename); in dtrace_compile_file()
/PHP-7.4/ext/standard/tests/file/
H A Dfscanf_error.phpt14 $file_handle = fopen($filename, 'w');
15 if ($file_handle == false)
17 fwrite($file_handle, "hello world");
18 fclose($file_handle);
25 if ($file_handle == false)
27 var_dump( fscanf($file_handle) );
28 fclose($file_handle);
35 if ($file_handle == false)
38 fclose($file_handle);
49 if ($file_handle == false)
[all …]
H A Dfscanf_variation1.phpt19 $file_handle = fopen($filename, "w");
20 if($file_handle == false)
22 @fwrite($file_handle, "hello_world ");
23 @fwrite($file_handle, 12345);
24 fclose($file_handle);
27 $file_handle = fopen($filename, "r");
29 $return_value = fscanf($file_handle, "%s");
31 fclose($file_handle);
H A Dfilesize_variation4-win32.phpt25 $file_handle = fopen($filename, "w");
27 fwrite($file_handle, $string);
28 fclose($file_handle);
35 fwrite($file_handle, $string);
36 fclose($file_handle);
41 $file_handle = fopen($filename, "a");
42 fwrite($file_handle, "Hello, world");
43 fclose($file_handle);
50 fclose($file_handle);
57 fclose($file_handle);
[all …]
H A Dfscanf_variation54.phpt32 $file_handle = fopen($filename, "w");
33 if($file_handle == false)
36 fwrite($file_handle, $obj);
39 fclose($file_handle);
47 $file_handle = fopen($filename, "r");
48 if($file_handle == false) {
54 var_dump( fscanf($file_handle,$format) );
55 rewind($file_handle);
58 fclose($file_handle);
H A Dfgets_variation2.phpt22 $file_handle = fopen(__FILE__, "r");
24 fclose($file_handle);
27 var_dump( fgets($file_handle) ); // default length
28 var_dump( fgets($file_handle, 10) ); // with specific length
32 $file_handle = fopen(__FILE__, "r");
34 unset($file_handle);
37 var_dump( fgets($file_handle) ); // default length
38 var_dump( fgets($file_handle, 10) ); // with specific length
53 Notice: Undefined variable: file_handle in %s on line %d
58 Notice: Undefined variable: file_handle in %s on line %d
H A D007_variation8.phpt28 $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 Dfilesize_variation4.phpt27 $file_handle = fopen($filename, "w");
29 fwrite($file_handle, $string);
30 fclose($file_handle);
37 fwrite($file_handle, $string);
38 fclose($file_handle);
43 $file_handle = fopen($filename, "a");
44 fwrite($file_handle, "Hello, world");
45 fclose($file_handle);
52 fclose($file_handle);
59 fclose($file_handle);
[all …]
H A D007_variation15.phpt28 $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: false
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 D007_variation16.phpt28 $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 D007_variation23.phpt28 $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: false
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 D007_variation24.phpt28 $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 D007_variation7.phpt28 $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: false
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 D007_variation10.phpt30 $file_handle = fopen($file, "r+t"); //opening the file in "r+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( 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 D007_variation18.phpt30 $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 D007_variation2.phpt30 $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 Dftruncate_bug76422.phpt14 $file_handle = fopen($fn,'cb');
16 if (false === $file_handle) {
23 $ftruncate_result = ftruncate($file_handle, $truncate_offset);
30 $ftruncate_result = ftruncate($file_handle, $truncate_offset);
36 fclose($file_handle);
H A Dflock_basic.phpt15 $file_handle = fopen($lock_file, "w");
16 var_dump(flock($file_handle, LOCK_SH|LOCK_NB));
17 var_dump(flock($file_handle, LOCK_UN));
18 var_dump(flock($file_handle, LOCK_EX));
19 var_dump(flock($file_handle, LOCK_UN));
20 fclose($file_handle);
H A Dfflush_variation4.phpt25 $file_handle = fopen($file_name, "w");
26 if($file_handle == false)
28 fclose($file_handle);
31 $file_handle = fopen($file_name, $mode);
32 if($file_handle == false)
34 var_dump( fflush($file_handle) );
35 fclose($file_handle);
H A Dfgetc_variation2.phpt22 $file_handle = fopen(__FILE__, "r");
24 fclose($file_handle);
27 var_dump( fgetc($file_handle) );
31 $file_handle = fopen(__FILE__, "r");
33 unset($file_handle);
36 var_dump( fgetc($file_handle) );
48 Notice: Undefined variable: file_handle in %s on line %d
H A Dpopen_pclose_basic.phpt28 $file_handle = popen(CMD, 'r');
29 fpassthru($file_handle);
30 pclose($file_handle);
36 $file_handle = popen($command, "r");
37 $return_value = fpassthru($file_handle);
40 pclose($file_handle);
45 $file_handle = popen("sort", "w");
49 fwrite($file_handle, $str);
50 fwrite($file_handle, $newline);
52 pclose($file_handle);
H A D007_variation6.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; 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_variation1.phpt30 $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 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 D007_variation17.phpt30 $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
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

Completed in 41 milliseconds

12345678910>>...15