Home
last modified time | relevance | path

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

12345678910>>...21

/PHP-7.1/Zend/
H A Dzend_stream.c114 return file_handle->handle.stream.fsizer(file_handle->handle.stream.handle); in zend_stream_fsize()
116 if (file_handle->handle.fp && zend_fstat(fileno(file_handle->handle.fp), &buf) == 0) { in zend_stream_fsize()
155 if (!zend_stream_is_mmap(file_handle) && file_handle->handle.stream.isatty) {
177 return file_handle->handle.stream.reader(file_handle->handle.stream.handle, buf, len);
186 if (zend_stream_open(file_handle->filename, file_handle) == FAILURE) {
191 switch (file_handle->type) {
194 file_handle->handle.fp = fdopen(file_handle->handle.fd, "rb");
255 file_handle->handle.stream.mmap.len = zend_stream_read(file_handle, *buf, size);
291 file_handle->handle.stream.mmap.old_handle = file_handle->handle.stream.handle;
292 file_handle->handle.stream.mmap.old_closer = file_handle->handle.stream.closer;
[all …]
H A Dzend_dtrace.c27 ZEND_API zend_op_array *(*zend_dtrace_compile_file)(zend_file_handle *file_handle, int type);
46 ZEND_API zend_op_array *dtrace_compile_file(zend_file_handle *file_handle, int type) in dtrace_compile_file() argument
49 DTRACE_COMPILE_FILE_ENTRY(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename); in dtrace_compile_file()
50 res = compile_file(file_handle, type); in dtrace_compile_file()
51 DTRACE_COMPILE_FILE_RETURN(ZSTR_VAL(file_handle->opened_path), (char *)file_handle->filename); in dtrace_compile_file()
/PHP-7.1/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_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: 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 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 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: 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 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: 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 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_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_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_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 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_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; 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 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; 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 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; 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 Dflock_basic.phpt14 $file_handle = fopen("$file_path/lock.tmp", "w");
15 var_dump(flock($file_handle, LOCK_SH|LOCK_NB));
16 var_dump(flock($file_handle, LOCK_UN));
17 var_dump(flock($file_handle, LOCK_EX));
18 var_dump(flock($file_handle, LOCK_UN));
19 fclose($file_handle);
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, (binary)$str);
50 fwrite($file_handle, (binary)$newline);
52 pclose($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 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: empty string
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 …]

Completed in 31 milliseconds

12345678910>>...21