/PHP-7.4/ext/standard/tests/file/ |
H A D | fwrite_variation3-win32.phpt | 23 include ("file.inc"); 70 // close the file, get the size and content of the file. 86 -- Opening file in a -- 98 -- Opening file in ab -- 110 -- Opening file in at -- 122 -- Opening file in a+ -- 160 -- Opening file in a -- 172 -- Opening file in ab -- 184 -- Opening file in at -- 234 -- Opening file in a -- [all …]
|
H A D | 007_variation13-win32.phpt | 14 Description: Opens file or URL. 19 Description: Closes an open file pointer 22 /* Test fopen() and fclose(): Opening the file in "at" mode, 23 checking for the file creation, write & read operations, 24 checking for the file pointer position, 28 require($file_path."/file.inc"); 31 $file = $file_path."/007_variation13.tmp"; 35 $file_handle = fopen($file, "at"); //opening the file "at" mode 46 unlink($file); //Deleting the file 47 fclose( fopen($file, "at") ); //Opening the non-existing file in "at" mode, which will be created [all …]
|
H A D | 007_variation13.phpt | 14 Description: Opens file or URL. 19 Description: Closes an open file pointer 22 /* Test fopen() and fclose(): Opening the file in "at" mode, 23 checking for the file creation, write & read operations, 24 checking for the file pointer position, 28 require($file_path."/file.inc"); 31 $file = $file_path."/007_variation13.tmp"; 35 $file_handle = fopen($file, "at"); //opening the file "at" mode 46 unlink($file); //Deleting the file 47 fclose( fopen($file, "at") ); //Opening the non-existing file in "at" mode, which will be created [all …]
|
H A D | 007_variation21.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "ab" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 23 require($file_path."/file.inc"); 26 $file = $file_path."/007_variation21.tmp"; 30 $file_handle = fopen($file, "ab"); //opening the file "ab" mode 41 unlink($file); //Deleting the file 42 fclose( fopen($file, "ab") ); //Opening the non-existing file in "ab" mode, which will be created [all …]
|
H A D | 007_variation5.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "a" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 23 require($file_path."/file.inc"); 26 $file = $file_path."/007_variation5.tmp"; 30 $file_handle = fopen($file, "a"); //opening the file "a" mode 41 unlink($file); //Deleting the file 42 fclose( fopen($file, "a") ); //Opening the non-existing file in "a" mode, which will be created [all …]
|
H A D | ftruncate_variation4-win32.phpt | 13 Description: Truncates a file to a given length 16 // include common file related test functions 17 include ("file.inc"); 21 /* test ftruncate with file opened in different modes */ 35 // create 1 file with some contents 38 // fopen the file using the $file_modes 43 // fopen the file using the $file_modes 47 echo "Error: failed to open file $filename!\n"; 51 rewind($file_handle); // file pointer to 0 76 -- Testing ftruncate() with file opening using r mode -- [all …]
|
H A D | ftruncate_variation4.phpt | 13 Description: Truncates a file to a given length 16 // include common file related test functions 17 include ("file.inc"); 21 /* test ftruncate with file opened in different modes */ 35 // create 1 file with some contents 38 // fopen the file using the $file_modes 43 // fopen the file using the $file_modes 47 echo "Error: failed to open file $filename!\n"; 51 rewind($file_handle); // file pointer to 0 76 -- Testing ftruncate() with file opening using r mode -- [all …]
|
H A D | fgetss_variation1-win32.phpt | 24 // include the common file related test functions 25 include ("file.inc"); 57 echo "Error: failed to open file $filename!\n"; 61 // rewind the file pointer to beginning of the file 67 /* read entire file and strip tags */ 73 // close the file 76 // delete the file 85 -- Testing fgetss() with file opened using w mode -- 97 -- Testing fgetss() with file opened using wb mode -- 121 -- Testing fgetss() with file opened using a mode -- [all …]
|
H A D | fgetss_variation1.phpt | 24 // include the common file related test functions 25 include ("file.inc"); 53 echo "Error: failed to open file $filename!\n"; 57 // rewind the file pointer to beginning of the file 63 /* read entire file and strip tags */ 69 // close the file 72 // delete the file 81 -- Testing fgetss() with file opened using w mode -- 93 -- Testing fgetss() with file opened using wb mode -- 117 -- Testing fgetss() with file opened using a mode -- [all …]
|
H A D | 007_variation14.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "a+t" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 23 require($file_path."/file.inc"); 26 $file = $file_path."/007_variation14.tmp"; 30 $file_handle = fopen($file, "a+t"); //opening the file "a+t" mode 40 unlink($file); //Deleting the file 41 fclose( fopen($file, "a+t") ); //Opening the non-existing file in "a+t" mode, which will be created [all …]
|
H A D | 007_variation22.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "a+b" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 23 require($file_path."/file.inc"); 26 $file = $file_path."/007_variation22.tmp"; 30 $file_handle = fopen($file, "a+b"); //opening the file "a+b" mode 40 unlink($file); //Deleting the file 41 fclose( fopen($file, "a+b") ); //Opening the non-existing file in "a+b" mode, which will be created [all …]
|
H A D | bug45985.phpt | 2 Bug #35740 (touch() opened file raises a warning) 5 $file = __DIR__ . '/' . '__tmp_35740.dat'; 6 file_put_contents($file, 'test'); 7 $f = fopen($file, 'r'); 8 touch($file); 10 @unlink($file);
|
H A D | fgetcsv_variation21.phpt | 34 echo "Error: failed to create file $filename!\n"; 41 // else rewind the file pointer to beginning of the file 46 // rewind the file pointer to bof 57 // check the file pointer position and if eof 61 // close the file 63 //delete file 72 -- Testing fgetcsv() with file opened using r mode -- 80 -- Testing fgetcsv() with file opened using rb mode -- 88 -- Testing fgetcsv() with file opened using rt mode -- 96 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fread_basic.phpt | 13 // include the file.inc for common functions for test 14 include ("file.inc"); 33 test fread with file opened in "r" and "rb" mode only 53 echo "Error: failed to fopen() file: $filename!"; 71 /* read file by giving size more than its size */ 83 // reading 1000 bytes within the file max size 94 var_dump(fclose($file_handle)); // now close the file 97 // delete the file created 98 delete_file($filename); // delete file with name 109 Reading 1024 bytes from file, expecting 1024 bytes ... OK [all …]
|
H A D | fnmatch_basic.phpt | 15 echo "*** Testing fnmatch() with file ***\n"; 16 $file = basename(__FILE__); 18 var_dump( fnmatch("*.php", $file) ); 19 var_dump( fnmatch("*.p*p", $file) ); 20 var_dump( fnmatch("*.p*", $file) ); 21 var_dump( fnmatch("*", $file) ); 22 var_dump( fnmatch("**", $file) ); 23 var_dump( fnmatch("*.phpt", $file) ); 25 echo "*** Testing fnmatch() with other than file ***\n"; 35 *** Testing fnmatch() with file *** [all …]
|
H A D | unlink_variation2.phpt | 2 Test unlink() function : usage variations - unlink file in use 9 /* Try to unlink file when file handle is still in use */ 13 echo "*** Testing unlink() on a file which is in use ***\n"; 14 // temp file name used here 17 // create file 21 var_dump( file_exists($filename) ); // confirm file is deleted 22 // now close file handle 28 *** Testing unlink() on a file which is in use ***
|
H A D | unlink_variation4.phpt | 2 Test unlink() function : usage variations - unlink deleted file 9 /* Try deleting a file which is already deleted */ 13 // temp file used 16 echo "*** Testing unlink() on deleted file ***\n"; 17 // create temp file 21 // delete temp file 23 var_dump( file_exists($filename) ); // confirm file deleted 25 // delete deleted file 31 *** Testing unlink() on deleted file ***
|
H A D | filesize_variation4-win32.phpt | 2 Test filesize() function: usage variations - file mode & holes in file 17 require($file_path."/file.inc"); 20 …** Testing filesize() with data written using different file modes and by creating holes in file *… 40 echo "-- opening the file in 'a' mode, adding data and checking the file --\n"; 47 echo "-- opening the file in 'at' mode, adding data and checking the file --\n"; 73 echo "-- with empty file --\n"; 89 *** Testing filesize() with data written using different file modes and by creating holes in file *… 96 -- opening the file in 'a' mode, adding data and checking the file -- 98 -- opening the file in 'at' mode, adding data and checking the file -- 105 -- opening the existing file in write mode -- [all …]
|
H A D | fgetcsv_variation11.phpt | 48 echo "Error: failed to create file $filename!\n"; 62 // else rewind the file pointer to beginning of the file 67 // rewind the file pointer to bof 80 // check the file pointer position and if eof 84 // close the file 86 //delete file 96 -- Testing fgetcsv() with file opened using r mode -- 106 -- Testing fgetcsv() with file opened using rb mode -- 116 -- Testing fgetcsv() with file opened using rt mode -- 126 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetss_variation5-win32.phpt | 57 // rewind the file pointer to beginning of the file 76 // close the file 79 // delete the file 93 -- Reading when file pointer points to EOF -- 108 -- Reading when file pointer points to EOF -- 123 -- Reading when file pointer points to EOF -- 138 -- Reading when file pointer points to EOF -- 153 -- Reading when file pointer points to EOF -- 168 -- Reading when file pointer points to EOF -- 183 -- Reading when file pointer points to EOF -- [all …]
|
H A D | fgetss_variation5.phpt | 54 // rewind the file pointer to beginning of the file 73 // close the file 76 // delete the file 90 -- Reading when file pointer points to EOF -- 105 -- Reading when file pointer points to EOF -- 120 -- Reading when file pointer points to EOF -- 135 -- Reading when file pointer points to EOF -- 150 -- Reading when file pointer points to EOF -- 165 -- Reading when file pointer points to EOF -- 180 -- Reading when file pointer points to EOF -- [all …]
|
H A D | 007_variation8.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "x+" mode, 18 checking for the file creation, write & read operations, 19 checking for the file pointer position, 20 checking for the warning msg when trying to open an existing file in "x+" mode, 25 $file = $file_path."/007_variation8.tmp"; 28 $file_handle = fopen($file, "x+"); //opening the non-existing file in "x+" mode, file will be crea… 31 var_dump( ftell($file_handle) ); //Initial file pointer position, expected at the beginning of the… 37 var_dump( fclose($file_handle) ); //Check for close operation on the file handle [all …]
|
H A D | fgetcsv_variation15.phpt | 43 echo "Error: failed to create file $filename!\n"; 56 // else rewind the file pointer to beginning of the file 61 // rewind the file pointer to bof 70 // check the file pointer position and if eof 74 // close the file 76 //delete file 86 -- Testing fgetcsv() with file opened using r mode -- 96 -- Testing fgetcsv() with file opened using rb mode -- 106 -- Testing fgetcsv() with file opened using rt mode -- 116 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetcsv_variation16.phpt | 45 echo "Error: failed to create file $filename!\n"; 58 // else rewind the file pointer to beginning of the file 63 // rewind the file pointer to bof 74 // check the file pointer position and if eof 78 // close the file 80 //delete file 90 -- Testing fgetcsv() with file opened using r mode -- 100 -- Testing fgetcsv() with file opened using rb mode -- 110 -- Testing fgetcsv() with file opened using rt mode -- 120 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
/PHP-7.4/ext/zlib/tests/ |
H A D | gzfile_variation15.phpt | 33 gzwrite($h, "This is a file in dir2"); 36 // should read dir2 file 40 //create a file in dir1 42 gzwrite($h, "This is a file in dir1"); 45 //should now read dir1 file 49 // create a file in working directory 54 //should still read dir1 file 70 //should read the file in script dir 85 string(22) "This is a file in dir2" 90 string(22) "This is a file in dir1" [all …]
|