/php-src/ext/standard/tests/file/ |
H A D | copy_variation10.phpt | 5 /* Test copy(): Try copying source file to desntination file, where destination file name is identi… 9 echo "*** Test copy(): Trying to create a copy of file with the same source name ***\n"; 10 $file = $file_path."/copy_variation10.tmp"; 11 $file_handle = fopen($file, "w"); 15 var_dump( copy($file, $file) ); 16 var_dump( file_exists($file) ); 17 var_dump( filesize($file) ); 26 *** Test copy(): Trying to create a copy of file with the same source name ***
|
H A D | fgets_variation3.phpt | 5 // include the file.inc for common test functions 6 include ("file.inc"); 29 echo "Error: failed to open file $filename!"; 34 // get the file pointer to beginning of the file 43 // get the file pointer to beginning of the file 51 //close file 54 // delete file 64 -- Testing fgets() with file opened using mode w+ -- 66 -- fgets() with default length, file pointer at 0 -- 77 -- fgets() with default length, file pointer at 0 -- [all …]
|
H A D | fputcsv_variation9.phpt | 61 //close the file 67 //delete file 77 -- file opened in r+ -- 83 -- file opened in r+b -- 89 -- file opened in r+t -- 95 -- file opened in a+ -- 113 -- file opened in w+ -- 131 -- file opened in x+ -- 149 -- file opened in r+ -- 167 -- file opened in a+ -- [all …]
|
H A D | fputcsv_variation13.phpt | 62 //close the file 68 //delete file 78 -- file opened in r+ -- 84 -- file opened in r+b -- 90 -- file opened in r+t -- 96 -- file opened in a+ -- 114 -- file opened in w+ -- 132 -- file opened in x+ -- 150 -- file opened in r+ -- 168 -- file opened in a+ -- [all …]
|
H A D | fgetcsv_variation22.phpt | 2 Test fgetcsv() : usage variations - with default enclosure, file pointer pointing at end of file 6 Testing fgetcsv() to read a file whose file pointer is pointing to end of file 10 echo "*** Testing fgetcsv() : with default enclosure, file pointer pointing at end of file ***\n"; 41 echo "Error: failed to create file $filename!\n"; 62 // set the file pointer to EOF 67 // now file pointer should point to end of the file, try reading again 70 // check the file pointer position and if eof 73 // close the file 75 //delete file 83 *** Testing fgetcsv() : with default enclosure, file pointer pointing at end of file *** [all …]
|
H A D | fwrite_variation1-win32-mb.phpt | 14 include ("file.inc"); 53 // move the file pointer to end of the file and try fwrite() 76 -- Opening file in r -- 92 -- Opening file in rb -- 108 -- Opening file in rt -- 126 -- Opening file in r -- 142 -- Opening file in rb -- 158 -- Opening file in rt -- 176 -- Opening file in r -- 192 -- Opening file in rb -- [all …]
|
H A D | fwrite_variation1.phpt | 8 include ("file.inc"); 46 // move the file pointer to end of the file and try fwrite() 68 -- Opening file in r -- 84 -- Opening file in rb -- 100 -- Opening file in rt -- 118 -- Opening file in r -- 134 -- Opening file in rb -- 150 -- Opening file in rt -- 168 -- Opening file in r -- 184 -- Opening file in rb -- [all …]
|
H A D | fnmatch_basic.phpt | 11 echo "*** Testing fnmatch() with file ***\n"; 12 $file = basename(__FILE__); 14 var_dump( fnmatch("*.php", $file) ); 15 var_dump( fnmatch("*.p*p", $file) ); 16 var_dump( fnmatch("*.p*", $file) ); 17 var_dump( fnmatch("*", $file) ); 18 var_dump( fnmatch("**", $file) ); 19 var_dump( fnmatch("*.phpt", $file) ); 21 echo "*** Testing fnmatch() with other than file ***\n"; 30 *** Testing fnmatch() with file *** [all …]
|
H A D | fgetcsv_variation1.phpt | 46 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 76 // check the file pointer position and if eof 80 // close the file 82 //delete file 92 -- Testing fgetcsv() with file opened using r mode -- 102 -- Testing fgetcsv() with file opened using rb mode -- 112 -- Testing fgetcsv() with file opened using rt mode -- 122 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetcsv_variation7.phpt | 46 echo "Error: failed to create file $filename!\n"; 60 // else rewind the file pointer to beginning of the file 65 // rewind the file pointer to bof 76 // check the file pointer position and if eof 80 // close the file 82 //delete file 92 -- Testing fgetcsv() with file opened using r mode -- 102 -- Testing fgetcsv() with file opened using rb mode -- 112 -- Testing fgetcsv() with file opened using rt mode -- 122 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | ftruncate_variation4.phpt | 5 // include common file related test functions 6 include ("file.inc"); 10 /* test ftruncate with file opened in different modes */ 24 // create 1 file with some contents 27 // fopen the file using the $file_modes 32 // fopen the file using the $file_modes 36 echo "Error: failed to open file $filename!\n"; 40 rewind($file_handle); // file pointer to 0 71 -- Testing ftruncate() with file opening using r mode -- 79 -- Testing ftruncate() with file opening using rb mode -- [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"; 13 file.txt 14 file.txt 15 file 16 notdriveletter:file.txt
|
H A D | fwrite_variation3-win32.phpt | 14 include ("file.inc"); 61 // close the file, get the size and content of the file. 77 -- Opening file in a -- 89 -- Opening file in ab -- 101 -- Opening file in at -- 113 -- Opening file in a+ -- 151 -- Opening file in a -- 163 -- Opening file in ab -- 175 -- Opening file in at -- 225 -- Opening file in a -- [all …]
|
H A D | fwrite_variation3.phpt | 14 include ("file.inc"); 62 // close the file, get the size and content of the file. 78 -- Opening file in a -- 90 -- Opening file in ab -- 102 -- Opening file in at -- 114 -- Opening file in a+ -- 152 -- Opening file in a -- 164 -- Opening file in ab -- 176 -- Opening file in at -- 226 -- Opening file in a -- [all …]
|
H A D | fgetcsv_variation2.phpt | 42 echo "Error: failed to create file $filename!\n"; 57 // else rewind the file pointer to beginning of the file 62 // rewind the file pointer to bof 73 // check the file pointer position and if eof 77 // close the file 79 //delete file 89 -- Testing fgetcsv() with file opened using r mode -- 99 -- Testing fgetcsv() with file opened using rb mode -- 109 -- Testing fgetcsv() with file opened using rt mode -- 119 -- Testing fgetcsv() with file opened using r+ mode -- [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 | fgets_variation6-win32.phpt | 11 // include the file.inc for common test functions 12 include ("file.inc"); 40 // seek to end of the file and try fgets() 49 //close file 52 // delete file 64 -- fgets() with file pointer pointing at EOF -- 72 -- fgets() with file pointer pointing at EOF -- 80 -- fgets() with file pointer pointing at EOF -- 88 -- fgets() with file pointer pointing at EOF -- 98 -- fgets() with file pointer pointing at EOF -- [all …]
|
/php-src/ext/pdo_mysql/tests/ |
H A D | pdo_mysql___construct_uri.phpt | 17 $file = $tmp . DIRECTORY_SEPARATOR . 'pdomuri.tst'; 21 $uri = 'uri:file://' . $file; 23 if ($fp = @fopen($file, 'w')) { 27 assert(file_exists($file)); 33 $file, filesize($file), file_get_contents($file), 36 unlink($file); 39 if ($fp = @fopen($file, 'w')) { 43 assert(file_exists($file)); 49 $file, filesize($file), file_get_contents($file), 52 unlink($file);
|
/php-src/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-src/ext/spl/tests/SplFileObject/ |
H A D | SplFileObject_fwrite_variation_001.phpt | 5 $file = __DIR__.'/SplFileObject_fwrite_variation_001.txt'; 6 if(file_exists($file)) { 7 unlink($file); 9 $obj = New SplFileObject($file,'w'); 11 var_dump(file_get_contents($file)); 15 $file = __DIR__.'/SplFileObject_fwrite_variation_001.txt'; 16 if(file_exists($file)) { 17 unlink($file);
|
H A D | SplFileObject_fwrite_variation_002.phpt | 5 $file = __DIR__.'/SplFileObject_fwrite_variation_002.txt'; 6 if(file_exists($file)) { 7 unlink($file); 9 $obj = New SplFileObject($file,'w'); 11 var_dump(file_get_contents($file)); 15 $file = __DIR__.'/SplFileObject_fwrite_variation_002.txt'; 16 if(file_exists($file)) { 17 unlink($file);
|
H A D | SplFileObject_key_fgets_and_seek.phpt | 6 $file = new SplTempFileObject(); 9 $file->fwrite("Foo $i\n"); 12 $file->seek(50); 15 ['line' => $file->key(), 'contents' => trim($file->fgets())], 16 ['line' => $file->key(), 'contents' => trim($file->fgets())], 17 ['line' => $file->key(), 'contents' => trim($file->fgets())],
|
/php-src/ext/opcache/tests/ |
H A D | opcache_invalidate_deleted_file.phpt | 2 opcache_invalidate() should invalidate deleted file 12 $file = __DIR__ . DIRECTORY_SEPARATOR . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc'; 13 file_put_contents($file, <<<PHP 17 var_dump(include $file); 18 unlink($file); 19 var_dump(include $file); 20 var_dump(opcache_invalidate($file)); 21 var_dump(@(include $file));
|
/php-src/ext/gd/tests/ |
H A D | 001-mb.phpt | 2 imagecreatefrompng() and empty/missing file 10 $file = __DIR__."/001私はガラスを食べられます.test"; 11 @unlink($file); 13 var_dump(imagecreatefrompng($file)); 14 touch($file); 15 var_dump(imagecreatefrompng($file)); 17 @unlink($file); 22 Warning: imagecreatefrompng(%s001私はガラスを食べられます.test): Failed to open stream: No such file or directo… 25 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 10 $file = __DIR__."/001.test"; 11 @unlink($file); 13 var_dump(imagecreatefrompng($file)); 14 touch($file); 15 var_dump(imagecreatefrompng($file)); 17 @unlink($file); 22 Warning: imagecreatefrompng(%s001.test): Failed to open stream: No such file or directory in %s on … 25 Warning: imagecreatefrompng(): "%s001.test" is not a valid PNG file in %s on line %d
|