/PHP-7.1/Zend/ |
H A D | zend_stream.c | 114 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 D | zend_dtrace.c | 27 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 D | fscanf_error.phpt | 14 $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 D | fscanf_variation1.phpt | 19 $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 D | filesize_variation4-win32.phpt | 25 $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 D | fscanf_variation54.phpt | 32 $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 D | fgets_variation2.phpt | 22 $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 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_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_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_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 | filesize_variation4.phpt | 27 $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 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_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_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_variation10.phpt | 30 $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 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_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 | 007_variation1.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 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_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 | flock_basic.phpt | 14 $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 D | popen_pclose_basic.phpt | 28 $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 D | fflush_variation4.phpt | 25 $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 D | fgetc_variation2.phpt | 22 $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 D | 007_variation11-win32.phpt | 36 $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 …]
|