/PHP-7.3/ext/standard/tests/file/windows_mb_path/ |
H A D | bug64699.phpt | 31 $dir = $prefix; 32 if ($dh = opendir($dir)) { 34 $path = $dir . $file; 54 filetype()[dir ] == is_dir()[dir ] -> OK: . 55 filetype()[dir ] == is_dir()[dir ] -> OK: .. 56 filetype()[dir ] == is_dir()[dir ] -> OK: a 57 filetype()[dir ] == is_dir()[dir ] -> OK: şŞıİğĞ 58 filetype()[dir ] == is_dir()[dir ] -> OK: ソ 59 filetype()[dir ] == is_dir()[dir ] -> OK: ゾ 60 filetype()[dir ] == is_dir()[dir ] -> OK: 多国語 [all …]
|
H A D | recursive_it.phpt | 2 RecursiveDirectoryIterator with dir path long or of edge case length 16 $dir = dirname(__FILE__); 17 while ($need_len - strlen($dir) > 32) { 18 $dir .= DIRECTORY_SEPARATOR . str_repeat("a", 32); 20 $dir .= DIRECTORY_SEPARATOR . str_repeat("a", $need_len - strlen($dir)); 21 mkdir($dir, 0700, true); 23 $fl = $dir . DIRECTORY_SEPARATOR . "hello.txt"; 27 $start = substr($dir, 0, strpos($dir, DIRECTORY_SEPARATOR, strlen(dirname(__FILE__))+1)); 55 rmdir($dir); 56 $dir = dirname($dir); [all …]
|
/PHP-7.3/tests/security/ |
H A D | open_basedir_dir.phpt | 10 test_open_basedir_before("dir"); 11 test_open_basedir_error("dir"); 17 test_open_basedir_after("dir");?> 33 Warning: dir(../bad): failed to open dir: %s in %s on line %d 38 Warning: dir(../bad/bad.txt): failed to open dir: %s in %s on line %d 43 Warning: dir(..): failed to open dir: %s in %s on line %d 48 Warning: dir(../): failed to open dir: %s in %s on line %d 53 Warning: dir(/): failed to open dir: %s in %s on line %d 58 Warning: dir(../bad/.): failed to open dir: %s in %s on line %d 63 Warning: dir(%s/test/bad/bad.txt): failed to open dir: %s in %s on line %d [all …]
|
/PHP-7.3/ext/standard/tests/dir/ |
H A D | dir_variation8.phpt | 12 * Prototype : object dir(string $directory[, resource $context]) 14 * Source code: ext/standard/dir.c 35 var_dump( dir($file_path."/dir_var*") ); 36 var_dump( dir($file_path."/*") ); 39 var_dump( dir($dir_path."/sub_dir?") ); 40 var_dump( dir($dir_path."/sub?dir1") ); 45 *** Testing dir() : checking with wildcard characters *** 48 Warning: dir(%s/dir_var*): failed to open dir: %s in %s on line %d 51 Warning: dir(%s/*): failed to open dir: %s in %s on line %d 55 Warning: dir(%s/dir_variation81/sub_dir?): failed to open dir: %s in %s on line %d [all …]
|
H A D | dir_error.phpt | 2 Test dir() function : error conditions 6 * Prototype : object dir(string $directory[, resource $context]) 8 * Source code: ext/standard/dir.c 11 echo "*** Testing dir() : error conditions ***\n"; 14 echo "\n-- Testing dir() function with zero arguments --"; 15 var_dump( dir() ); 20 var_dump( dir(getcwd(), "stream", $extra_arg) ); 25 *** Testing dir() : error conditions *** 27 -- Testing dir() function with zero arguments -- 28 Warning: dir() expects at least 1 parameter, 0 given in %s on line %d [all …]
|
H A D | dir_variation7.phpt | 23 * Source code: ext/standard/dir.c 27 * remove the execute permission from the parent dir and test dir() on child dir 32 echo "*** Testing dir() : remove execute permission from the parent dir ***\n"; 37 |-> child_dir ( child dir) 56 $d = dir($child_dir_path); // try to open, expected failure 59 // remove the execute permisson from parent dir, allowing all permission for sub dir 60 chmod($sub_dir_path, 0777); // all permisson to sub dir 63 $d = dir($child_dir_path); // try to open, expected failure 85 *** Testing dir() : remove execute permission from the parent dir *** 88 Warning: dir(%s/dir_variation7/sub_dir/child_dir): failed to open dir: %s in %s on line %d [all …]
|
H A D | dir_variation2.phpt | 2 Test dir() function : usage variations - unexpected value for 'context' argument 6 * Prototype : object dir(string $directory[, resource $context]) 8 * Source code: ext/standard/dir.c 12 * Passing non resource values to 'context' argument of dir() and see 16 echo "*** Testing dir() : unexpected values for \$context argument ***\n"; 96 var_dump( dir($directory, $unexpected_value) ); 110 *** Testing dir() : unexpected values for $context argument *** 113 Warning: dir() expects parameter 2 to be resource, int given in %s on line %d 117 Warning: dir() expects parameter 2 to be resource, int given in %s on line %d 121 Warning: dir() expects parameter 2 to be resource, int given in %s on line %d [all …]
|
H A D | dir_variation6.phpt | 2 Test dir() function : usage variations - non-existent directory 12 * Prototype : object dir(string $directory[, resource $context]) 14 * Source code: ext/standard/dir.c 21 echo "*** Testing dir() : open a non-existent directory ***\n"; 29 $d = dir($dir_path); 30 $d->close(); //close the dir 37 var_dump( dir($dir_path) ); 42 $d = dir($non_existent_dir); 48 *** Testing dir() : open a non-existent directory *** 51 Warning: dir(%s): failed to open dir: %s in %s on line %d [all …]
|
H A D | dir_variation1.phpt | 2 Test dir() function : usage variations - unexpected value for 'dir' argument 12 * Prototype : object dir(string $directory[, resource $context]) 14 * Source code: ext/standard/dir.c 18 * Passing non string values to 'directory' argument of dir() and see 22 echo "*** Testing dir() : unexpected values for \$directory argument ***\n"; 38 $dfp = opendir( dirname(__FILE__) ); // get a dir handle 70 // resource variable(dir and file handle) 82 var_dump( dir($unexpected_value) ); 91 *** Testing dir() : unexpected values for $directory argument *** 126 Warning: dir(1): failed to open dir: %s in %s on line %d [all …]
|
H A D | dir_variation2-win32-mb.phpt | 2 Test dir() function : usage variations - unexpected value for 'context' argument 12 * Prototype : object dir(string $directory[, resource $context]) 14 * Source code: ext/standard/dir.c 18 * Passing non resource values to 'context' argument of dir() and see 22 echo "*** Testing dir() : unexpected values for \$context argument ***\n"; 102 var_dump( dir($directory, $unexpected_value) ); 116 *** Testing dir() : unexpected values for $context argument *** 119 Warning: dir() expects parameter 2 to be resource, int given in %s on line %d 123 Warning: dir() expects parameter 2 to be resource, int given in %s on line %d 127 Warning: dir() expects parameter 2 to be resource, int given in %s on line %d [all …]
|
H A D | dir_variation9.phpt | 2 Test dir() function : usage variations - relative valid and invalid paths 12 * Prototype : object dir(string $directory[, resource $context]) 14 * Source code: ext/standard/dir.c 45 var_dump( dir("$dir_path1/sub_dir11/sub_dir111/..") ); 46 var_dump( dir("$dir_path2/sub_dir21/../../dir_variation91") ); 52 var_dump( dir("$dir_path1/sub_dir12/sub_dir111/..") ); 53 var_dump( dir("$dir_path2/sub_dir21/../dir_variation91") ); 106 Warning: dir(%s/dir_variation91/sub_dir12/sub_dir111/..): failed to open dir: %s in %s on line %d 109 Warning: dir(%s/dir_variation92/sub_dir21/../dir_variation91): failed to open dir: %s in %s on line… 112 Warning: dir(%s/dir_variation92/sub_dir21/../../dir_variation91/sub_dir12/..): failed to open dir: … [all …]
|
/PHP-7.3/ext/spl/tests/ |
H A D | bug77263.phpt | 5 $dir = __DIR__ . '/bug77263'; 6 mkdir($dir); 7 mkdir("$dir/subdir"); 8 touch("$dir/file1"); 9 touch("$dir/subdir/file2"); 19 $iterator = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS ); 33 $dir = __DIR__ . '/bug77263'; 34 unlink("$dir/file1"); 35 unlink("$dir/subdir/file2"); 36 rmdir("$dir/subdir"); [all …]
|
H A D | bug78863.phpt | 5 $dir = __DIR__ . '/bug78863'; 6 mkdir($dir); 7 touch("$dir/bad"); 8 mkdir("$dir/sub"); 9 touch("$dir/sub/good"); 26 $dir = __DIR__ . '/bug78863'; 27 unlink("$dir/sub/good"); 28 rmdir("$dir/sub"); 29 unlink("$dir/bad"); 30 rmdir($dir);
|
/PHP-7.3/ext/zip/tests/ |
H A D | bug70103.phpt | 9 $dir = __DIR__ . '/bug70103'; 11 mkdir($dir); chmod($dir, 0777); 12 file_put_contents($dir . '/foo.txt', 'foo'); 15 $zip->open($dir . '/test.zip', ZipArchive::CREATE | ZipArchive::OVERWRITE); 16 $zip->addGlob($dir . '/*.txt', GLOB_NOSORT, array('remove_all_path' => true)); 20 $zip->open($dir . '/test.zip'); 27 $dir = __DIR__ . '/bug70103'; 28 unlink($dir . '/foo.txt'); 29 unlink($dir . '/test.zip'); 30 rmdir($dir);
|
H A D | bug70350.phpt | 10 $dir = dirname(__FILE__)."/bug70350"; 11 mkdir($dir); 13 $archive->open("$dir/a.zip",ZipArchive::CREATE); 18 $archive2->open("$dir/a.zip"); 19 $archive2->extractTo($dir); 21 var_dump(file_exists("$dir/down2/")); 26 $dir = dirname(__FILE__)."/bug70350"; 27 rmdir("$dir/down2"); 28 unlink("$dir/a.zip"); 29 rmdir($dir);
|
/PHP-7.3/ext/fileinfo/tests/ |
H A D | bug61964-mb.phpt | 13 $dir = __DIR__ . "/test-folder"; 14 @mkdir($dir); 21 $ret = finfo_open(FILEINFO_NONE, $dir); 24 $ret = @finfo_open(FILEINFO_NONE, $dir); 27 $ret = @finfo_open(FILEINFO_NONE, $dir. "/non-exits-dir私はガラスを食べられます"); 35 finfo_open(FILEINFO_NONE, $dir); 36 echo "DONE: testing dir with files\n"; 39 unlink($dir . "/test1.txt"); 40 unlink($dir . "/test2.txt"); 44 rmdir($dir); [all …]
|
H A D | bug61964.phpt | 13 $dir = __DIR__ . "/test-folder"; 14 @mkdir($dir); 16 $magic_file_copy = $dir . "/magic.copy"; 27 $ret = @finfo_open(FILEINFO_NONE, $dir. "/non-exits-dir"); 33 @mkdir($dir . "/test-inner-folder"); 35 finfo_open(FILEINFO_NONE, $dir); 38 rmdir($dir . "/test-inner-folder"); 39 unlink($dir . "/test1.txt"); 40 unlink($dir . "/test2.txt"); 44 rmdir($dir); [all …]
|
/PHP-7.3/ext/standard/tests/file/ |
H A D | basename_variation1.phpt | 38 "dir/foo.bar", 39 "dir\\foo.bar", 40 "dir with spaces/foo.bar", 41 "dir with spaces\\foo.bar", 72 string(11) "dir\foo.bar" 92 string(11) "dir\foo.bar" 112 string(14) "A:\dir\foo.bar" 132 string(11) "dir\foo.bar" 152 string(11) "dir\foo.bar" 212 string(11) "dir\foo.bar" [all …]
|
H A D | filesize_variation2-win32.phpt | 2 Test filesize() function: usage variations - size of dir/subdir 21 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n"; 22 echo "-- Creating a base dir, and checking its size --\n"; 27 echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 35 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n"; 37 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir 48 // size of base dir 70 *** Testing size of a dir, sub-dir and file with filesize() *** 71 -- Creating a base dir, and checking its size -- 73 -- Creating a file inside base dir, and checking dir & file size -- [all …]
|
H A D | filesize_variation2.phpt | 2 Test filesize() function: usage variations - size of dir/subdir 21 echo "\n*** Testing size of a dir, sub-dir and file with filesize() ***\n"; 22 echo "-- Creating a base dir, and checking its size --\n"; 27 echo "-- Creating a file inside base dir, and checking dir & file size --\n"; 35 echo "-- Creating an empty sub-dir in base-dir, and checking size of base and sub dir --\n"; 37 var_dump( filesize( $file_path."/filesize_variation2")); // size of base dir 48 // size of base dir 70 *** Testing size of a dir, sub-dir and file with filesize() *** 71 -- Creating a base dir, and checking its size -- 73 -- Creating a file inside base dir, and checking dir & file size -- [all …]
|
H A D | copy_variation13.phpt | 10 /* Test copy(): Trying to copy dir to an existing file */ 16 $dir = $file_path."/copy_variation13"; 17 mkdir($dir); 19 echo "*** Testing copy() in copying dir to file ***\n"; 20 var_dump( copy($dir, $file) ); 23 var_dump( file_exists($dir) ); 25 var_dump( is_file($dir) ); 26 var_dump( is_dir($dir) ); 32 var_dump( filesize($dir) ); 42 *** Test copy() function: Trying to copy dir to file *** [all …]
|
H A D | basename_variation2.phpt | 20 "dir/foo.bar", 21 "dir\\foo.bar", 22 "dir with spaces/foo.bar", 193 string(7) "dir\foo" 195 string(11) "dir\foo.bar" 197 string(11) "dir\foo.bar" 199 string(11) "dir\foo.bar" 201 string(11) "dir\foo.bar" 203 string(4) "dir\" 205 string(11) "dir\foo.bar" [all …]
|
/PHP-7.3/ext/phar/tests/ |
H A D | bug70019.phpt | 7 $dir = __DIR__."/bug70019"; 9 if(!is_dir($dir)) { 10 mkdir($dir); 12 $phar->extractTo($dir); 13 var_dump(file_exists("$dir/ThisIsATestFile.txt")); 18 $dir = __DIR__."/bug70019"; 19 unlink("$dir/ThisIsATestFile.txt"); 20 rmdir($dir);
|
H A D | phar_extract2.phpt | 41 $dir = dirname(__FILE__) . '/extract2/'; 42 @unlink($dir . 'file1.txt'); 43 @unlink($dir . 'file2.txt'); 44 @unlink($dir . 'subdir/ectory/file.txt'); 45 @rmdir($dir . 'subdir/ectory'); 46 @rmdir($dir . 'subdir'); 47 @rmdir($dir . 'one/level'); 48 @rmdir($dir . 'one'); 49 @rmdir($dir); 50 $dir = dirname(__FILE__) . '/extract1/'; [all …]
|
/PHP-7.3/ext/spl/examples/ |
H A D | phar_from_dir.php | 33 $dir = new RecursiveDirectoryIterator($argv[2]); variable 34 $dir = new RecursiveIteratorIterator($dir); variable 37 $dir = new RegexIterator($dir, '/'.$argv[3].'/'); variable 42 foreach($dir as $file)
|