2
Test rewinddir() function : error conditions - incorrect number of args
5
/* Prototype : void rewinddir([resource $dir_handle])
6
* Description: Rewind dir_handle back to the start
7
* Source code: ext/standard/dir.c
8
* Alias to functions: rewind
12
* Pass incorrect number of arguments to rewinddir() to test behaviour
15
echo "*** Testing rewinddir() : error conditions ***\n";
18
//Test rewinddir with one more than the expected number of arguments
19
echo "\n-- Testing rewinddir() function with more than expected no. of arguments --\n";
21
$dir_path = dirname(__FILE__) . "/rewinddir_error";
23
$dir_handle = opendir($dir_path);
26
var_dump( rewinddir($dir_handle, $extra_arg) );
27
closedir($dir_handle);
32
$dir_path = dirname(__FILE__) . "/rewinddir_error";
36
*** Testing rewinddir() : error conditions ***
38
-- Testing rewinddir() function with more than expected no. of arguments --
40
Warning: rewinddir() expects at most 1 parameter, 2 given in %s on line %d