/PHP-8.3/Zend/ |
H A D | zend_stream.c | 60 return file_handle->handle.stream.fsizer(file_handle->handle.stream.handle); in zend_stream_fsize() 131 if (file_handle->buf) { in zend_stream_fixup() 132 *buf = file_handle->buf; in zend_stream_fixup() 133 *len = file_handle->len; in zend_stream_fixup() 149 file_handle->handle.stream.handle = file_handle->handle.fp; in zend_stream_fixup() 172 file_handle->buf = *buf; in zend_stream_fixup() 173 file_handle->len = size; in zend_stream_fixup() 193 file_handle->len = size; in zend_stream_fixup() 205 memset(file_handle->buf + file_handle->len, 0, ZEND_MMAP_AHEAD); in zend_stream_fixup() 207 *buf = file_handle->buf; in zend_stream_fixup() [all …]
|
H A D | zend_dtrace.c | 25 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), ZSTR_VAL(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), ZSTR_VAL(file_handle->filename)); in dtrace_compile_file()
|
/PHP-8.3/ext/standard/tests/file/ |
H A D | fscanf_error.phpt | 9 $file_handle = fopen($filename, 'w'); 10 if ($file_handle == false) 12 fwrite($file_handle, "hello world"); 13 fclose($file_handle); 17 fscanf($file_handle, "%s"); 23 $file_handle = fopen($filename, 'r'); 24 if ($file_handle == false) 31 fclose($file_handle); 39 $file_handle = fopen($filename, 'r'); 40 if ($file_handle == false) [all …]
|
H A D | fsync.phpt | 17 $file_handle = fopen($filename, "w"); 18 if($file_handle == false) 26 var_dump( fwrite($file_handle, $data) ); 27 var_dump( fsync($file_handle) ); 31 $return_value = fsync($file_handle); 33 fclose($file_handle); 36 $file_handle = fopen("php://stdin", "w"); 37 var_dump(fsync($file_handle)); 38 fclose($file_handle); 42 $return_value = fsync($file_handle); [all …]
|
H A D | fdatasync.phpt | 17 $file_handle = fopen($filename, "w"); 18 if($file_handle == false) 26 var_dump( fwrite($file_handle, $data) ); 27 var_dump( fdatasync($file_handle) ); 31 $return_value = fdatasync($file_handle); 33 fclose($file_handle); 36 $file_handle = fopen("php://stdin", "w"); 37 var_dump(fdatasync($file_handle)); 38 fclose($file_handle); 42 $return_value = fdatasync($file_handle); [all …]
|
H A D | fscanf_variation1.phpt | 14 $file_handle = fopen($filename, "w"); 15 if($file_handle == false) 17 @fwrite($file_handle, "hello_world "); 18 @fwrite($file_handle, 12345); 19 fclose($file_handle); 22 $file_handle = fopen($filename, "r"); 24 $return_value = fscanf($file_handle, "%s"); 26 fclose($file_handle);
|
H A D | filesize_variation4-win32.phpt | 19 $file_handle = fopen($filename, "w"); 21 fwrite($file_handle, $string); 22 fclose($file_handle); 29 fwrite($file_handle, $string); 30 fclose($file_handle); 35 $file_handle = fopen($filename, "a"); 36 fwrite($file_handle, "Hello, world"); 37 fclose($file_handle); 44 fclose($file_handle); 51 fclose($file_handle); [all …]
|
H A D | fscanf_variation54.phpt | 27 $file_handle = fopen($filename, "w"); 28 if($file_handle == false) 31 fwrite($file_handle, $obj); 34 fclose($file_handle); 42 $file_handle = fopen($filename, "r"); 43 if($file_handle == false) { 49 var_dump( fscanf($file_handle,$format) ); 50 rewind($file_handle); 53 fclose($file_handle);
|
H A D | filesize_variation4.phpt | 21 $file_handle = fopen($filename, "w"); 23 fwrite($file_handle, $string); 24 fclose($file_handle); 31 fwrite($file_handle, $string); 32 fclose($file_handle); 37 $file_handle = fopen($filename, "a"); 38 fwrite($file_handle, "Hello, world"); 39 fclose($file_handle); 46 fclose($file_handle); 53 fclose($file_handle); [all …]
|
H A D | 007_variation8.phpt | 17 $file_handle = fopen($file, "x+"); //opening the non-existing file in "x+" mode, file will be crea… 18 var_dump($file_handle); //Check for the content of handle 19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 23 rewind($file_handle); 24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the… 25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation10.phpt | 19 $file_handle = fopen($file, "r+t"); //opening the file in "r+t" mode 20 var_dump($file_handle); //Check for the content of handle 21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 23 var_dump( fread($file_handle, 100) ); //Check for read operation 24 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 25 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 26 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 28 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation18.phpt | 19 $file_handle = fopen($file, "r+b"); //opening the file in "r+b" mode 20 var_dump($file_handle); //Check for the content of handle 21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 23 var_dump( fread($file_handle, 100) ); //Check for read operation 24 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 25 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 26 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 28 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation2.phpt | 19 $file_handle = fopen($file, "r+"); //opening the file in "r+" mode 20 var_dump($file_handle); //Check for the content of handle 21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 22 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 23 var_dump( fread($file_handle, 100) ); //Check for read operation 24 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 25 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 26 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 27 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 28 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation15.phpt | 26 $file_handle = fopen($file, "xt"); //opening the non-existing file in "xt" mode, file will be crea… 27 var_dump($file_handle); //Check for the content of handle 28 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 29 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 30 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 31 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 32 rewind($file_handle); 33 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false 35 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 36 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation [all …]
|
H A D | 007_variation16.phpt | 17 $file_handle = fopen($file, "x+t"); //opening the non-existing file in "x+t" mode, file will be cr… 18 var_dump($file_handle); //Check for the content of handle 19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 23 rewind($file_handle); 24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the… 25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation23.phpt | 17 $file_handle = fopen($file, "xb"); //opening the non-existing file in "xb" mode, file will be crea… 18 var_dump($file_handle); //Check for the content of handle 19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 23 rewind($file_handle); 24 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false 26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 27 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation [all …]
|
H A D | 007_variation24.phpt | 17 $file_handle = fopen($file, "x+b"); //opening the non-existing file in "x+b" mode, file will be cr… 18 var_dump($file_handle); //Check for the content of handle 19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 23 rewind($file_handle); 24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of the… 25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | 007_variation7.phpt | 17 $file_handle = fopen($file, "x"); //opening the non-existing file in "x" mode, file will be created 18 var_dump($file_handle); //Check for the content of handle 19 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 20 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 21 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 22 var_dump( ftell($file_handle) ); //File pointer position after write operation, expected at the en… 23 rewind($file_handle); 24 var_dump( fread($file_handle, 100) ); //Check for read operation; fails; expected: false 26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 27 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation [all …]
|
H A D | 007_variation1.phpt | 19 $file_handle = fopen($file, "r"); //opening the file in "r" mode 20 var_dump($file_handle); //Check for the content of handle 21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 22 var_dump( ftell($file_handle) ); //Initial position of file pointer 23 var_dump( fread($file_handle, 100) ); //Check for read operation 24 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails 25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 26 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation17.phpt | 19 $file_handle = fopen($file, "rb"); //opening the file in "rb" mode 20 var_dump($file_handle); //Check for the content of handle 21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 22 var_dump( ftell($file_handle) ); //Initial position of file pointer 23 var_dump( fread($file_handle, 100) ); //Check for read operation 24 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails 25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 26 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | 007_variation9.phpt | 19 $file_handle = fopen($file, "rt"); //opening the file in "rt" mode 20 var_dump($file_handle); //Check for the content of handle 21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 22 var_dump( ftell($file_handle) ); //Initial position of file pointer 23 var_dump( fread($file_handle, 100) ); //Check for read operation 24 var_dump( fwrite($file_handle, $string) ); //Check for write operation; fails 25 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 26 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|
H A D | fflush_variation4.phpt | 22 $file_handle = fopen($file_name, "w"); 23 if($file_handle == false) 25 fclose($file_handle); 28 $file_handle = fopen($file_name, $mode); 29 if($file_handle == false) 31 var_dump( fflush($file_handle) ); 32 fclose($file_handle);
|
H A D | flock_basic.phpt | 14 $file_handle = fopen($lock_file, "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 D | popen_pclose_basic.phpt | 20 $file_handle = popen(CMD, 'r'); 21 fpassthru($file_handle); 22 pclose($file_handle); 29 $file_handle = popen($command, "r"); 30 $return_value = fpassthru($file_handle); 33 pclose($file_handle); 38 $file_handle = popen("sort", "w"); 42 fwrite($file_handle, $str); 43 fwrite($file_handle, $newline); 45 pclose($file_handle);
|
H A D | 007_variation14.phpt | 19 $file_handle = fopen($file, "a+t"); //opening the file "a+t" mode 20 var_dump($file_handle); //Check for the content of handle 21 var_dump( get_resource_type($file_handle) ); //Check for the type of resource 22 var_dump( fwrite($file_handle, $string) ); //Check for write operation; passes; expected:size of t… 23 rewind($file_handle); 24 var_dump( fread($file_handle, 100) ); //Check for read operation; passes; expected: content of file 25 var_dump( ftell($file_handle) ); //File pointer position after read operation, expected at the end… 26 var_dump( fclose($file_handle) ); //Check for close operation on the file handle 27 var_dump( get_resource_type($file_handle) ); //Check whether resource is lost after close operation
|