1--TEST--
2Test is_writable() and its alias is_writeable() function: usage variations - invalid file names
3--SKIPIF--
4<?php
5require __DIR__ . '/../skipif_root.inc';
6?>
7--CONFLICTS--
8obscure_filename
9--FILE--
10<?php
11/* test is_writable() & is_writeable() with invalid arguments */
12
13echo "*** Testing is_writable(): usage variations ***\n";
14
15echo "\n*** Testing is_writable() with invalid filenames ***\n";
16$misc_files = array(
17  0,
18  1234,
19  -2.34555,
20  TRUE,
21  FALSE,
22  NULL,
23  " ",
24  @$file_handle
25);
26/* loop through to test each element in the above array
27   is a writable file */
28foreach( $misc_files as $misc_file ) {
29  var_dump( is_writable($misc_file) );
30  var_dump( is_writeable($misc_file) );
31  clearstatcache();
32}
33?>
34--EXPECT--
35*** Testing is_writable(): usage variations ***
36
37*** Testing is_writable() with invalid filenames ***
38bool(false)
39bool(false)
40bool(false)
41bool(false)
42bool(false)
43bool(false)
44bool(false)
45bool(false)
46bool(false)
47bool(false)
48bool(false)
49bool(false)
50bool(false)
51bool(false)
52bool(false)
53bool(false)
54