1--TEST--
2Test is_executable() function: usage variations - invalid file names
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') {
6    die('skip not for windows');
7}
8require __DIR__ . '/../skipif_root.inc';
9?>
10--FILE--
11<?php
12/* test is_executable() with invalid arguments */
13
14echo "*** Testing is_executable(): usage variations ***\n";
15
16$file_handle = fopen(__FILE__, "r");
17unset($file_handle);
18
19echo "\n*** Testing is_executable() on invalid files ***\n";
20$invalid_files = array(
21  0,
22  1234,
23  -2.34555,
24  TRUE,
25  FALSE,
26  " ",
27);
28/* loop through to test each element in the above array
29   is an executable file */
30foreach( $invalid_files as $invalid_file ) {
31  var_dump( is_executable($invalid_file) );
32  clearstatcache();
33}
34
35echo "Done\n";
36?>
37--EXPECT--
38*** Testing is_executable(): usage variations ***
39
40*** Testing is_executable() on invalid files ***
41bool(false)
42bool(false)
43bool(false)
44bool(false)
45bool(false)
46bool(false)
47Done
48