/PHP-7.4/ext/standard/tests/file/ |
H A D | file_variation7.phpt | 2 file() on a file with blank lines 11 echo "file():\n"; 12 var_dump(file($filepath)); 15 var_dump(file($filepath, FILE_IGNORE_NEW_LINES)); 18 var_dump(file($filepath, FILE_SKIP_EMPTY_LINES)); 21 var_dump(file($filepath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES)); 27 file(): 45 file() with FILE_IGNORE_NEW_LINES: 59 file() with FILE_SKIP_EMPTY_LINES: 77 file() with FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES:
|
H A D | fgetcsv_variation18.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 71 // use different delimiter than existing in file 75 // check the file pointer position and if eof 79 // close the file 81 //delete file 91 -- Testing fgetcsv() with file opened using r mode -- 99 -- Testing fgetcsv() with file opened using rb mode -- 107 -- Testing fgetcsv() with file opened using rt mode -- [all …]
|
H A D | fgetcsv_variation22.phpt | 2 Test fgetcsv() : usage variations - with default enclosure, file pointer pointing at end of file 11 Testing fgetcsv() to read a file whose file pointer is pointing to end of file 15 echo "*** Testing fgetcsv() : with default enclosure, file pointer pointing at end of file ***\n"; 46 echo "Error: failed to create file $filename!\n"; 67 // set the file pointer to EOF 72 // now file pointer should point to end of the file, try reading again 75 // check the file pointer position and if eof 78 // close the file 80 //delete file 88 *** Testing fgetcsv() : with default enclosure, file pointer pointing at end of file *** [all …]
|
H A D | basename_bug66395-win32.phpt | 7 echo basename("c:file.txt") . "\n"; 8 echo basename("d:subdir\\file.txt") . "\n"; 9 echo basename("y:file.txt", ".txt") . "\n"; 10 echo basename("notdriveletter:file.txt") . "\n"; 14 file.txt 15 file.txt 16 file 17 notdriveletter:file.txt
|
H A D | fopen_variation10-win32.phpt | 18 * Description: Open a file or a URL and return a file pointer 50 $thirdfile = 'c:\\'.$file; 91 file in root 94 file in root 99 file not opened for read 106 file not opened for read 113 file not opened for read 123 file not opened for read 128 file in root 140 file in fopen10.tmpDir [all …]
|
H A D | fopen_variation11-win32.phpt | 17 * Description: Open a file or a URL and return a file pointer 49 $thirdfile = 'c:\\'.$file; 89 file in root 92 file in root 97 file not opened for read 104 file not opened for read 111 file not opened for read 121 file not opened for read 126 file in root 138 file in fopen11.tmpDir [all …]
|
H A D | 001-win32-mb.phpt | 15 $fname = 'test_私はガラスを食べられます.file'; 65 if (is_dir('../file')) { 66 echo "../file is a directory\n"; 90 test_私はガラスを食べられます.file exists 92 test_私はガラスを食べられます.file exists 93 test_私はガラスを食べられます.file is file 95 test_私はガラスを食べられます.file size is 0 96 test_私はガラスを食べられます.file is writeable 97 test_私はガラスを食べられます.file is readable 98 test_私はガラスを食べられます.file is a regular file [all …]
|
H A D | copy_variation13.phpt | 6 Description: Makes a copy of the file source to dest. 10 /* Test copy(): Trying to copy dir to an existing file */ 14 $file = $file_path."/copy_variation13_dir.tmp"; 15 fclose(fopen($file, "w")); 19 echo "*** Testing copy() in copying dir to file ***\n"; 20 var_dump( copy($dir, $file) ); 22 var_dump( file_exists($file) ); 28 var_dump( is_file($file) ); 29 var_dump( is_dir($file) ); 31 var_dump( filesize($file) ); [all …]
|
H A D | fflush_variation4.phpt | 2 Test fflush() function: usage variations - file opened in read-only mode 6 Description: Flushes the output to a file 12 require $file_path.'/file.inc'; 22 echo "-- Iteration $count with file opened in $mode mode --\n"; 24 // creating a file 27 exit("Error:failed to open file $file_name"); 30 // opening the file in different read modes 33 exit("Error:failed to open file $file_name"); 45 -- Iteration 1 with file opened in r mode -- 47 -- Iteration 2 with file opened in rb mode -- [all …]
|
H A D | fgets_variation6-win32.phpt | 13 Description: Gets a line from file pointer 16 // include the file.inc for common test funcitons 17 include ("file.inc"); 45 // seek to end of the file and try fgets() 54 //close file 57 // delete file 69 -- fgets() with file pointer pointing at EOF -- 77 -- fgets() with file pointer pointing at EOF -- 85 -- fgets() with file pointer pointing at EOF -- 93 -- fgets() with file pointer pointing at EOF -- [all …]
|
H A D | fgets_variation6.phpt | 13 Description: Gets a line from file pointer 16 // include the file.inc for common test funcitons 17 include ("file.inc"); 45 // seek to end of the file and try fgets() 54 //close file 57 // delete file 69 -- fgets() with file pointer pointing at EOF -- 77 -- fgets() with file pointer pointing at EOF -- 85 -- fgets() with file pointer pointing at EOF -- 93 -- fgets() with file pointer pointing at EOF -- [all …]
|
H A D | symlink_link_linkinfo_is_link_variation3.phpt | 25 /* Variation 3 : Create file and a soft link to the file 36 // create temp file 37 $file = fopen($filename, "w"); 39 // create soft link to file 46 // fill data into file 48 fclose($file); 89 // write to temp file 90 $file = fopen($filename, "w"); 91 fwrite($file, "Hello World"); 92 fclose($file); [all …]
|
H A D | fgetcsv_variation1.phpt | 47 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 77 // check the file pointer position and if eof 81 // close the file 83 //delete file 93 -- Testing fgetcsv() with file opened using r mode -- 103 -- Testing fgetcsv() with file opened using rb mode -- 113 -- Testing fgetcsv() with file opened using rt mode -- 123 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetcsv_variation2.phpt | 47 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 78 // check the file pointer position and if eof 82 // close the file 84 //delete file 94 -- Testing fgetcsv() with file opened using r mode -- 104 -- Testing fgetcsv() with file opened using rb mode -- 114 -- Testing fgetcsv() with file opened using rt mode -- 124 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetcsv_variation7.phpt | 47 echo "Error: failed to create file $filename!\n"; 61 // else rewind the file pointer to beginning of the file 66 // rewind the file pointer to bof 77 // check the file pointer position and if eof 81 // close the file 83 //delete file 93 -- Testing fgetcsv() with file opened using r mode -- 103 -- Testing fgetcsv() with file opened using rb mode -- 113 -- Testing fgetcsv() with file opened using rt mode -- 123 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fwrite_variation1-win32-mb.phpt | 23 include ("file.inc"); 62 // move the file pointer to end of the file and try fwrite() 85 -- Opening file in r -- 101 -- Opening file in rb -- 117 -- Opening file in rt -- 135 -- Opening file in r -- 151 -- Opening file in rb -- 167 -- Opening file in rt -- 185 -- Opening file in r -- 201 -- Opening file in rb -- [all …]
|
H A D | fwrite_variation1.phpt | 17 include ("file.inc"); 55 // move the file pointer to end of the file and try fwrite() 77 -- Opening file in r -- 93 -- Opening file in rb -- 109 -- Opening file in rt -- 127 -- Opening file in r -- 143 -- Opening file in rb -- 159 -- Opening file in rt -- 177 -- Opening file in r -- 193 -- Opening file in rb -- [all …]
|
H A D | fscanf_variation51.phpt | 2 Test fscanf() function: usage variations - file opened in write only mode 8 Description: Parses input from a file according to a format 11 /* Test fscanf() to scan a file for read when file is opened inwrite only mode */ 15 echo "*** Test fscanf(): to read from a file opened in write only mode ***\n"; 17 // create a file 21 exit("Error:failed to open file $filename"); 22 //writing data to the file 25 //closing the file 40 // reading the values from file using different integer formats 45 exit("Error:failed to open file $filename"); [all …]
|
H A D | 007_variation6.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_variation6.tmp"; 30 $file_handle = fopen($file, "a+"); //opening the file "a+" mode 40 unlink($file); //Deleting the file 41 fclose( fopen($file, "a+") ); //Opening the non-existing file in "a+" mode, which will be created [all …]
|
H A D | fgetss_variation4.phpt | 17 // include the common file related test functions 18 include ("file.inc"); 52 // rewind the file pointer to beginning of the file 70 // close the file 72 // delete the file 86 -- Reading when file pointer points to EOF -- 101 -- Reading when file pointer points to EOF -- 116 -- Reading when file pointer points to EOF -- 131 -- Reading when file pointer points to EOF -- 146 -- Reading when file pointer points to EOF -- [all …]
|
H A D | fwrite_variation3.phpt | 23 include ("file.inc"); 71 // close the file, get the size and content of the file. 87 -- Opening file in a -- 99 -- Opening file in ab -- 111 -- Opening file in at -- 123 -- Opening file in a+ -- 161 -- Opening file in a -- 173 -- Opening file in ab -- 185 -- Opening file in at -- 235 -- Opening file in a -- [all …]
|
/PHP-7.4/ext/gd/tests/ |
H A D | 001-mb.phpt | 2 imagecreatefrompng() and empty/missing file 8 $file = __DIR__."/001私はガラスを食べられます.test"; 9 @unlink($file); 11 var_dump(imagecreatefrompng($file)); 12 touch($file); 13 var_dump(imagecreatefrompng($file)); 15 @unlink($file); 20 Warning: imagecreatefrompng(%s001私はガラスを食べられます.test): failed to open stream: No such file or directo… 23 Warning: imagecreatefrompng(): '%s001私はガラスを食べられます.test' is not a valid PNG file in %s on line %d
|
H A D | 001.phpt | 2 imagecreatefrompng() and empty/missing file 8 $file = __DIR__."/001.test"; 9 @unlink($file); 11 var_dump(imagecreatefrompng($file)); 12 touch($file); 13 var_dump(imagecreatefrompng($file)); 15 @unlink($file); 20 Warning: imagecreatefrompng(%s001.test): failed to open stream: No such file or directory in %s on … 23 Warning: imagecreatefrompng(): '%s001.test' is not a valid PNG file in %s on line %d
|
/PHP-7.4/ext/curl/tests/ |
H A D | bug27023.phpt | 14 curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc?test=file"); 17 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt'); 18 $params = array('file' => $file); 22 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain"); 23 $params = array('file' => $file); 27 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', null, "foo.txt"); 28 $params = array('file' => $file); 32 $file = curl_file_create(__DIR__ . '/curl_testdata1.txt', "text/plain", "foo.txt"); 33 $params = array('file' => $file);
|
/PHP-7.4/tests/security/ |
H A D | open_basedir_file.phpt | 9 test_open_basedir_before("file"); 10 test_open_basedir_error("file"); 12 var_dump(file("ok.txt")); 13 var_dump(file("../ok/ok.txt")); 14 var_dump(file($initdir."/test/ok/ok.txt")); 15 var_dump(file($initdir."/test/ok/../ok/ok.txt")); 17 test_open_basedir_after("file"); 25 *** Testing open_basedir configuration [file] *** 44 Warning: file(..): failed to open stream: %s in %s on line %d 54 Warning: file(/): failed to open stream: %s in %s on line %d [all …]
|