/PHP-7.4/ext/standard/tests/file/ |
H A D | stream_001.phpt | 6 var_dump(stream_wrapper_unregister('file')); 7 var_dump(fopen("file://".__FILE__, "r")); 8 var_dump(stream_wrapper_restore('file')); 9 var_dump(fopen("file://".__FILE__, "r")); 16 Warning: fopen(): Unable to find the wrapper "file" - did you forget to enable it when you configur… 18 Warning: fopen(): file:// wrapper is disabled in the server configuration in %s on line %d 20 Warning: fopen(file://%s): failed to open stream: no suitable wrapper could be found in %s on line …
|
H A D | fgetc_variation3.phpt | 7 Description: Gets character from file pointer 16 include ("file.inc"); 18 echo "*** Testing fgetc() with file opened in write only mode ***\n"; 27 echo "Error: failed to open file $filename!\n"; 33 // rewind the file pointer to beginning of the file 38 // read from file 40 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed 41 var_dump( feof($file_handle) ); // check if end of file pointer is set 43 // close the file 46 // delete the file [all …]
|
H A D | fgets_variation1.phpt | 7 Description: Gets a line from file pointer 15 include ("file.inc"); 17 echo "*** Testing fgets() with file opened in write only mode ***\n"; 26 echo "Error: failed to open file $filename!\n"; 32 // rewind the file pointer to beginning of the file 37 // read from file 39 var_dump( ftell($file_handle) ); // ensure that file pointer position is not changed 40 var_dump( feof($file_handle) ); // check if end of file pointer is set 42 // close the file 45 // delete the file [all …]
|
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 [all …]
|
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 [all …]
|
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 [all …]
|
H A D | fputcsv_variation14.phpt | 36 // create the file 47 // create the file 71 //close the file 77 //delete file 87 -- file opened in r -- 99 -- file opened in rb -- 111 -- file opened in rt -- 123 -- file opened in r -- 159 -- file opened in r -- 195 -- file opened in r -- [all …]
|
H A D | stat_variation5-win32.phpt | 2 Test stat() functions: usage variations - file opened in read/write mode 14 * Description: Gives information about a file 17 /* test the stats of file opened in write mode and then same in read mode */ 20 require "$file_path/file.inc"; 23 $file_handle = fopen("$file_path/stat_variation5.tmp", "w"); // temp file 27 echo "\n*** Testing stat(): on a file with read/write permission ***\n"; 30 $file_handle = fopen($filename, "w"); // create file 36 // opening file again in read mode 37 $file_handle = fopen($filename, "r"); // read file 58 *** Testing stat(): on a file with read/write permission ***
|
H A D | fgetcsv_variation13.phpt | 32 echo "Error: failed to create file $filename!\n"; 39 // else rewind the file pointer to beginning of the file 44 // rewind the file pointer to bof 54 // check the file pointer position and if eof 58 // close the file 60 //delete file 69 -- Testing fgetcsv() with file opened using r mode -- 77 -- Testing fgetcsv() with file opened using rb mode -- 85 -- Testing fgetcsv() with file opened using rt mode -- 93 -- Testing fgetcsv() with file opened using r+ mode -- [all …]
|
H A D | fgetcsv_variation20.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 | 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 | 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
|
/PHP-7.4/sapi/phpdbg/ |
H A D | phpdbg_parser.y | 85 $$.file.name = $2.str; 86 $$.file.line = $3.num; 90 $$.file.name = $1.str; 91 $$.file.line = $4.num; 96 if ($$.file.name) { 97 memcpy(&$$.file.name[0], $1.str, $1.len); 99 $$.file.name[$1.len + $2.len] = '\0'; 101 $$.file.line = $4.num; 106 if ($$.file.name) { 109 $$.file.name[$1.len + $2.len] = '\0'; [all …]
|
/PHP-7.4/ext/session/tests/ |
H A D | session_basic5.phpt | 63 <a href="file.php">test</a> 64 <a href="file.php?foo">test</a> 65 <a href="file.php?foo=var">test</a> 66 <a href="file.php?foo=var#bar">test</a> 67 <a href="../file.php">test</a> 68 <a href="../file.php?foo">test</a> 69 <a href="../file.php?foo=var">test</a> 70 <a href="../file.php?foo=var#bar">test</a> 112 <a href="//php.net/file.php">test</a> 193 <a href="//bad.com/file.php">test</a> [all …]
|
/PHP-7.4/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.4/ext/standard/tests/file/windows_mb_path/ |
H A D | bug75063_cp1251.phpt | 2 Bug #75063 Many filesystem-related functions do not work with multibyte file names, cp1251 17 /* This file is in cp1251. */ 42 while ((\$file = readdir(\$dh)) !== false) { 43 if ("." == \$file || ".." == \$file) continue; 44 var_dump(\$file); 62 foreach ($obj as $file) { 63 if ("." == $file || ".." == $file) continue; 64 unlink($d0 . DIRECTORY_SEPARATOR . $file);
|
/PHP-7.4/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( __DIR__."/../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.4/ext/standard/tests/image/ |
H A D | image_type_to_mime_type.phpt | 13 while (($file = readdir($dir)) !== FALSE) { 14 if (preg_match('/^test.+pix\./',$file) && $file != "test13pix.swf") { 15 $files[] = $file; 20 foreach($files as $file) { 21 $result[$file] = getimagesize(__DIR__."/$file"); 22 $result[$file] = image_type_to_mime_type($result[$file][2]);
|
/PHP-7.4/ext/standard/tests/strings/ |
H A D | md5_file.phpt | 7 * Description: Calculate the MD5 hash of a given file 10 /* Creating an empty file */ 14 /* Creating a data file */ 18 /* Writing into file */ 20 $content = "Add this to the file\n"; 23 echo "Cannot write to file ($filename)"; 53 /* Hexadecimal Output for Empty file as input */ 57 /* Raw Binary Output for Empty file as input */ 96 *** Hexadecimal Output for Empty file as Argument *** 99 *** Raw Binary Output for Empty file as Argument *** [all …]
|
/PHP-7.4/Zend/tests/ |
H A D | debug_backtrace_options.phpt | 76 [file] => %sdebug_backtrace_options.php 87 [file] => %sdebug_backtrace_options.php 101 [file] => %sdebug_backtrace_options.php 120 [file] => %sdebug_backtrace_options.php 139 [file] => %sdebug_backtrace_options.php 151 [file] => %sdebug_backtrace_options.php 165 [file] => %sdebug_backtrace_options.php 184 [file] => %sdebug_backtrace_options.php 203 [file] => %sdebug_backtrace_options.php 215 [file] => %sdebug_backtrace_options.php [all …]
|
/PHP-7.4/ext/standard/tests/streams/ |
H A D | bug70362.phpt | 7 $file = __DIR__ . '/bug70362.txt'; 10 var_dump(copy($data, $file)); 11 echo file_get_contents($file); 15 $file = __DIR__ . '/bug70362.txt'; 16 @unlink($file);
|
/PHP-7.4/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.4/ext/phar/tests/ |
H A D | bug76584.phpt | 13 $phar->addFromString('76584.txt', 'This is a test file.'); 14 $file = $phar['76584.txt']; 15 var_dump($file->compress(Phar::GZ)); 16 var_dump($file->isCompressed()); 17 var_dump($file->decompress()); 18 var_dump($file->isCompressed()); 29 This is a test file.
|