?>
--FILE--
<?php
-/*
+/*
* Prototype : object dir(string $directory[, resource $context])
* Description: Directory class with properties, handle and class and methods read, rewind and close
* Source code: ext/standard/dir.c
}
// get a resource variable
-$fp = fopen(__FILE__, "r"); // get a file handle
+$fp = fopen(__FILE__, "r"); // get a file handle
$dfp = opendir( dirname(__FILE__) ); // get a dir handle
// unexpected values to be passed to $directory argument
-- Iteration 1 --
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 2 --
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 3 --
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 4 --
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 5 --
-Warning: dir() expects parameter 1 to be string, array given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 6 --
-- Iteration 16 --
-Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, resource given in %s on line %d
NULL
-- Iteration 17 --
-Warning: dir() expects parameter 1 to be string, resource given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, resource given in %s on line %d
NULL
-- Iteration 18 --
-Warning: dir() expects parameter 1 to be string, object given in %s on line %d
+Warning: dir() expects parameter 1 to be a valid path, object given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
--FILE--
<?php
/* Prototype : mixed opendir(string $path[, resource $context])
- * Description: Open a directory and return a dir_handle
+ * Description: Open a directory and return a dir_handle
* Source code: ext/standard/dir.c
*/
// get a class
class classA {
-
+
var $path;
function __construct($path) {
$this->path = $path;
false,
TRUE,
FALSE,
-
+
// empty data
/*16*/ "",
'',
/*19*/ "$path",
'string',
$heredoc,
-
+
// object data
/*22*/ new classA($path),
-- Iteration 18 --
-Warning: opendir() expects parameter 1 to be string, array given in %s on line %d
+Warning: opendir() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 19 --
-- Iteration 25 --
-Warning: opendir() expects parameter 1 to be string, resource given in %s on line %d
+Warning: opendir() expects parameter 1 to be a valid path, resource given in %s on line %d
NULL
===DONE===
--FILE--
<?php
/* Prototype : mixed opendir(string $path[, resource $context])
- * Description: Open a directory and return a dir_handle
+ * Description: Open a directory and return a dir_handle
* Source code: ext/standard/dir.c
*/
// get a class
class classA {
-
+
var $path;
function __construct($path) {
$this->path = $path;
false,
TRUE,
FALSE,
-
+
// empty data
/*16*/ "",
'',
/*19*/ "$path",
'string',
$heredoc,
-
+
// object data
/*22*/ new classA($path),
-- Iteration 18 --
-Warning: opendir() expects parameter 1 to be string, array given in %s on line %d
+Warning: opendir() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
-- Iteration 19 --
-- Iteration 25 --
-Warning: opendir() expects parameter 1 to be string, resource given in %s on line %d
+Warning: opendir() expects parameter 1 to be a valid path, resource given in %s on line %d
NULL
===DONE===
Warning: mkdir() expects parameter 1 to be a valid path, string given in %s on line %d
bool(false)
-Warning: rmdir(%s): No such file or directory in %s on line %d
+Warning: rmdir() expects parameter 1 to be a valid path, string given in %s on line %d
bool(false)
*** Testing mkdir() with miscelleneous input ***
$file_path = realpath($file_path);
-/* An array of prefixes */
+/* An array of prefixes */
$names_arr = array(
- /* Valid args (casting)*/
+ /* Valid args (casting)*/
-1,
TRUE,
FALSE,
"",
" ",
"\0",
- /* Invalid args */
+ /* Invalid args */
array(),
- /* Valid args*/
+ /* Valid args*/
/* prefix with path separator of a non existing directory*/
- "/no/such/file/dir",
+ "/no/such/file/dir",
"php/php"
);
$res_arr = array(
- /* Invalid args */
+ /* Invalid args */
true,
true,
true,
false,
/* prefix with path separator of a non existing directory*/
- true,
+ true,
true
);
} else {
echo "Failed, not created in the correct directory " . realpath($file_dir) . ' vs ' . $file_path ."\n";
}
-
+
if (!is_writable($file_name)) {
printf("%o\n", fileperms($file_name) );
OK
-- Iteration 7 --
-Warning: tempnam() expects parameter 2 to be string, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d
+Warning: tempnam() expects parameter 2 to be a valid path, array given in %s\ext\standard\tests\file\tempnam_variation3-win32.php on line %d
OK
-- Iteration 8 --
OK
$file_path = dirname(__FILE__)."/tempnamVar3";
mkdir($file_path);
-/* An array of prefixes */
+/* An array of prefixes */
$names_arr = array(
- /* Invalid args */
+ /* Invalid args */
-1,
TRUE,
FALSE,
array(),
/* prefix with path separator of a non existing directory*/
- "/no/such/file/dir",
+ "/no/such/file/dir",
"php/php"
);
echo "File permissions are => ";
printf("%o", fileperms($file_name) );
echo "\n";
-
+
echo "File created in => ";
$file_dir = dirname($file_name);
-
+
if ($file_dir == sys_get_temp_dir()) {
echo "temp dir\n";
}
else {
echo "unknown location\n";
}
-
+
}
else {
echo "-- File is not created --\n";
File permissions are => 100600
File created in => directory specified
-- Iteration 6 --
-File name is => %s/%s
-File permissions are => 100600
-File created in => directory specified
+
+Warning: tempnam() expects parameter 2 to be a valid path, string given in %s on line %d
+-- File is not created --
+
+Warning: unlink(): %s in %s on line %d
-- Iteration 7 --
-Warning: tempnam() expects parameter 2 to be string, array given in %s on line %d
+Warning: tempnam() expects parameter 2 to be a valid path, array given in %s on line %d
-- File is not created --
Warning: unlink(): %s in %s on line %d
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
string(1) "."
Warning: get_include_path() expects exactly 0 parameters, 1 given in %s on line %d
NULL
string(1) "."
-Warning: set_include_path() expects parameter 1 to be string, array given in %s on line %d
+Warning: set_include_path() expects parameter 1 to be a valid path, array given in %s on line %d
NULL
string(1) "."
NULL