/PHP-7.0/ext/standard/tests/dir/ |
H A D | rewinddir_variation3.phpt | 2 Test rewinddir() function : usage variations - file pointers 12 * Pass a file pointer to rewinddir() to test behaviour 17 echo "\n-- Open a file using fopen --\n"; 24 echo "\n-- Check if rewinddir() has repositioned the file pointer --\n"; 26 echo "rewinddir() works on file pointers\n"; 28 echo "rewinddir() does not work on file pointers\n"; 35 -- Open a file using fopen -- 41 -- Check if rewinddir() has repositioned the file pointer -- 42 rewinddir() does not work on file pointers
|
H A D | readdir_variation6.phpt | 17 // include the file.inc for Function: function create_files() 18 include( dirname(__FILE__)."/../file/file.inc"); 35 while (FALSE !== ($file = readdir($dir_handle1))) { 36 $a[] = $file; 39 foreach ($a as $file) { 40 var_dump($file); 45 while (FALSE !== ($file = readdir())) { 46 $a[] = $file; 49 foreach ($a as $file) { 50 var_dump($file);
|
/PHP-7.0/ext/standard/tests/image/ |
H A D | image_type_to_mime_type.phpt | 14 while (($file = readdir($dir)) !== FALSE) { 15 if (preg_match('/^test.+pix\./',$file) && $file != "test13pix.swf") { 16 $files[] = $file; 21 foreach($files as $file) { 22 $result[$file] = getimagesize(dirname(__FILE__)."/$file"); 23 $result[$file] = image_type_to_mime_type($result[$file][2]);
|
H A D | getimagesize_246x247.phpt | 13 while (($file = readdir($dir)) !== FALSE) { 14 if (preg_match('/^246x247\./',$file)) { 15 $files[] = $file; 20 foreach($files as $file) { 21 $result[$file] = getimagesize(dirname(__FILE__)."/$file");
|
H A D | getimagesize_384x385.phpt | 13 while (($file = readdir($dir)) !== FALSE) { 14 if (preg_match('/^384x385\./',$file)) { 15 $files[] = $file; 20 foreach($files as $file) { 21 $result[$file] = getimagesize(dirname(__FILE__)."/$file");
|
/PHP-7.0/ext/spl/tests/ |
H A D | SplFileInfo_getExtension_basic.phpt | 5 $file = md5('SplFileInfo::getExtension'); 8 touch($file . $ext); 9 $info = new SplFileInfo($file . $ext); 10 var_dump($info->getExtension(), pathinfo($file . $ext, PATHINFO_EXTENSION)); 15 $file = md5('SplFileInfo::getExtension'); 18 unlink($file . $ext);
|
H A D | fileobject_getsize_basic.phpt | 10 $file = __DIR__ ."/data.txt"; 11 file_put_contents($file, "foobar"); 13 $s = new SplFileObject( $file ); 18 $file = __DIR__ ."/data.txt"; 19 unlink($file);
|
/PHP-7.0/ext/standard/tests/file/ |
H A D | 007_variation1.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "r" 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_variation1.tmp"; 30 $file_handle = fopen($file, "r"); //opening the file in "r" mode 33 var_dump( ftell($file_handle) ); //Initial position of file pointer 36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
|
H A D | 007_variation17.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "rb" 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_variation17.tmp"; 30 $file_handle = fopen($file, "rb"); //opening the file in "rb" mode 33 var_dump( ftell($file_handle) ); //Initial position of file pointer 36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
|
H A D | 007_variation9.phpt | 9 Description: Opens file or URL. 14 Description: Closes an open file pointer 17 /* Test fopen() and fclose(): Opening the file in "rt" 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_variation9.tmp"; 30 $file_handle = fopen($file, "rt"); //opening the file in "rt" mode 33 var_dump( ftell($file_handle) ); //Initial position of file pointer 36 var_dump( fclose($file_handle) ); //Check for close operation on the file handle
|
H A D | fgetcsv_variation17.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 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 -- 112 -- Testing fgetcsv() with file opened using rb mode -- 128 -- Testing fgetcsv() with file opened using rt mode -- [all …]
|
H A D | fgetcsv_variation23.phpt | 2 Test fgetcsv() : usage variations - empty file 7 Description: Gets line from file pointer and parse for CSV fields 10 /* Testing fgetcsv() to read from an empty file */ 12 echo "*** Testing fgetcsv() : reading from file which is having zero content ***\n"; 14 // try reading from file which is having zero content 15 // create the file and then open in read mode and try reading 21 echo "Error: failed to create file $filename!\n"; 33 // close and delete the file 39 *** Testing fgetcsv() : reading from file which is having zero content ***
|
H A D | userwrapper.phpt | 6 function unlink($file) { 7 print "Unlinking file: $file\n"; 23 /* By printing out a notice that we are actively stating the file 26 print "Stating file: $path\n"; 36 unlink('test://example.com/path/to/file'); 42 print_r(stat('test://example.com/path/to/file')); 43 echo "Filesize = " . filesize('test://example.com/path/to/file') . "\n"; 44 echo "filemtime = " . filemtime('test://example.com/path/to/file') . "\n"; 47 Unlinking file: test://example.com/path/to/file 51 Stating file: test://example.com/path/to/file
|
H A D | file_variation8.phpt | 2 Test file function : variation - various absolute and relative paths 7 /* Prototype : array file(string filename [, int flags[, resource context]]) 8 * Description: Read entire file into an array 9 * Source code: ext/standard/file.c 13 echo "*** Testing file() : variation ***\n"; 52 var_dump(file($dir."/".$filename)); 63 *** Testing file() : variation *** 91 Warning: file(%sfileVar8.dir/fileVar8Sub/..///fileVar8Sub//..//../fileVar8Sub/FileGetContentsVar7.t… 96 Warning: file(%sfileVar8.dir/fileVar8Sub/BADDIR/FileGetContentsVar7.tmp): failed to open stream: No… 125 Warning: file(BADDIR/FileGetContentsVar7.tmp): failed to open stream: No such file or directory in …
|
H A D | fgetcsv_variation6.phpt | 50 echo "Error: failed to create file $filename!\n"; 64 // else rewind the file pointer to beginning of the file 69 // rewind the file pointer to bof 80 // check the file pointer position and if eof 85 // check the file pointer position and if eof 89 // close the file 91 //delete file 101 -- Testing fgetcsv() with file opened using r mode -- 117 -- Testing fgetcsv() with file opened using rb mode -- 133 -- Testing fgetcsv() with file opened using rt mode -- [all …]
|
H A D | fgetcsv_variation19.phpt | 46 echo "Error: failed to create file $filename!\n"; 59 // else rewind the file pointer to beginning of the file 64 // 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 | fscanf_variation54.phpt | 8 Description: Parses input from a file according to a format 11 /* Test fscanf() to scan a file to read objects */ 15 echo "*** Test fscanf(): to read objects from a file ***\n"; 30 // create a file 34 exit("Error:failed to open file $filename"); 35 //writing object to the file 38 //closing the file 46 // opening file for read 49 exit("Error:failed to open file $filename"); 68 *** Test fscanf(): to read objects from a file ***
|
H A D | file_variation3.phpt | 2 Test file() function : second parameter variation 7 /* Prototype : array file(string filename [, int flags[, resource context]]) 8 * Description: Read entire file into an array 9 * Source code: ext/standard/file.c 13 echo "*** Testing file() : usage variation ***\n"; 109 var_dump( file($filename, $value, $context) ); 117 *** Testing file() : usage variation *** 130 Error: 2 - file(): '-10' flag is not supported, %s(%d) 134 Error: 2 - file(): '%i' flag is not supported, %s(%d) 138 Error: 2 - file(): '%i' flag is not supported, %s(%d) [all …]
|
H A D | copy_variation11.phpt | 6 Description: Makes a copy of the file source to dest. 14 echo "*** Test copy() function: Trying to create a copy of source file as a dir ***\n"; 15 $file = $file_path."/copy_variation11.tmp"; 16 $file_handle = fopen($file, "w"); 24 var_dump( filesize($file) ); //size of source before copy 31 var_dump( copy($file, $dir) ); //expected: bool(false) 33 var_dump( file_exists($file) ); //expected: bool(true) 36 var_dump( is_file($file) ); //expected: bool(true) 37 var_dump( is_dir($file) ); //expected: bool(false) 42 var_dump( filesize($file) ); //size of source after copy [all …]
|
H A D | file_variation8-win32.phpt | 2 Test file() function : variation - various absolute and relative paths 12 /* Prototype : array file(string filename [, int flags[, resource context]]) 13 * Description: Read entire file into an array 14 * Source code: ext/standard/file.c 18 echo "*** Testing file() : variation ***\n"; 60 var_dump(file($dir."\\".$filename)); 71 *** Testing file() : variation *** 99 Warning: file(%sfileVar8.dir\fileVar8Sub\..\\\fileVar8Sub\\..\\..\fileVar8Sub\FileGetContentsVar7.t… 104 Warning: file(%sfileVar8.dir\fileVar8Sub\BADDIR\FileGetContentsVar7.tmp): failed to open stream: No… 133 Warning: file(BADDIR\FileGetContentsVar7.tmp): failed to open stream: No such file or directory in …
|
/PHP-7.0/ext/mysqli/tests/ |
H A D | local_infile_tools.inc | 3 function shutdown_clean($file) { 4 if ($file) { 5 unlink($file); 28 if (!$file) { 51 // create a CVS file 55 printf("[%03d + 1] Cannot create CVS file '%s'\n", $offset, $file); 67 printf("[%03d + 2] Cannot write CVS file '%s'\n", $offset, $file); 75 printf("[%03d + 3] Cannot write CVS file '%s'\n", $offset, $file); 82 if (!chmod($file, 0644)) { 85 $offset, $file); [all …]
|
/PHP-7.0/ext/simplexml/tests/ |
H A D | 022.phpt | 10 <pres><content><file glob="slide_*.xml"/></content></pres> 19 var_dump($sxe->content->file); 22 foreach($sxe->content->file as $file) 24 var_dump($file); 25 var_dump($file['glob']); 33 ["file"]=>
|
/PHP-7.0/ext/zlib/tests/ |
H A D | gzopen_variation4.phpt | 12 * Description: Open a .gz-file and return a .gz-file pointer 49 // should read dir2 file 55 //create a file in dir1 60 //should now read dir1 file 111 This is a file in dir2 112 This is a file in dir1 113 This is a file in dir1 115 This is a file in script dir 155 This is a file in dir2 156 This is a file in dir1 [all …]
|
H A D | gzopen_variation8.phpt | 2 Test gzopen() function : variation: opening a plain file 12 * Description: Open a .gz-file and return a .gz-file pointer 25 $file = "gzopen_variation8.tmp"; 26 $h = fopen($file, 'w'); 30 $h = gzopen($file, 'r'); 34 unlink($file);
|
/PHP-7.0/ext/dba/ |
H A D | dba_cdb.c | 54 php_stream *file; member 57 int file; member 66 php_stream* file = 0; in DBA_OPEN_FUNC() local 69 int file = 0; in DBA_OPEN_FUNC() 78 file = info->fp; in DBA_OPEN_FUNC() 81 if (file < 0) { in DBA_OPEN_FUNC() 90 file = info->fp; in DBA_OPEN_FUNC() 109 cdb_init(&cdb->c, file); in DBA_OPEN_FUNC() 113 cdb_init(&cdb->c, file); in DBA_OPEN_FUNC() 115 cdb->file = file; in DBA_OPEN_FUNC() [all …]
|