Lines Matching refs:fseek

2 Test fseek(), ftell() & rewind() functions : error conditions - fseek() 
6 /* Prototype: int fseek ( resource $handle, int $offset [, int $whence] );
16 echo "*** Testing fseek() : error conditions ***\n";
18 echo "-- Testing fseek() with zero argument --\n";
19 var_dump( fseek() );
22 echo "-- Testing fseek() with unexpected number of arguments --\n";
24 var_dump( fseek($fp) );
25 var_dump( fseek($fp, 10, $fp,10) );
28 echo "-- Testing fseek() with invalid arguments --\n";
37 /* loop to test fseek() with different invalid type of args */
40 var_dump( fseek($invalid_args[$loop_counter - 1], 10) );
43 // fseek() on a file handle which is already closed
44 echo "-- Testing fseek() with closed/unset file handle --";
46 var_dump(fseek($fp,10));
48 // fseek() on a file handle which is unset
51 var_dump( fseek(@$file_handle,10));
56 *** Testing fseek() : error conditions ***
57 -- Testing fseek() with zero argument --
59 Warning: fseek() expects at least 2 parameters, 0 given in %s on line %d
61 -- Testing fseek() with unexpected number of arguments --
63 Warning: fseek() expects at least 2 parameters, 1 given in %s on line %d
66 Warning: fseek() expects at most 3 parameters, 4 given in %s on line %d
68 -- Testing fseek() with invalid arguments --
71 Warning: fseek() expects parameter 1 to be resource, string given in %s on line %d
75 Warning: fseek() expects parameter 1 to be resource, integer given in %s on line %d
79 Warning: fseek() expects parameter 1 to be resource, double given in %s on line %d
83 Warning: fseek() expects parameter 1 to be resource, boolean given in %s on line %d
87 Warning: fseek() expects parameter 1 to be resource, array given in %s on line %d
91 Warning: fseek() expects parameter 1 to be resource, object given in %s on line %d
93 -- Testing fseek() with closed/unset file handle --
94 Warning: fseek(): %d is not a valid stream resource in %s on line %d
97 Warning: fseek() expects parameter 1 to be resource, null given in %s on line %d