1--TEST--
2Test is_file() function: usage variations - invalid filenames
3--CONFLICTS--
4obscure_filename
5--FILE--
6<?php
7/* Testing is_file() with invalid arguments -int, float, bool, NULL */
8
9function flatten($variable) {
10    \ob_start();
11    \var_dump($variable);
12    $flattened =
13        \ob_get_contents();
14    \ob_end_clean();
15    return \trim($flattened);
16}
17
18foreach([
19  /* Invalid filenames */
20  -2.34555,
21  " ",
22  "",
23  true,
24  false,
25  null,
26
27  /* scalars */
28  1234,
29  0
30] as $filename ) {
31  printf(
32      "%s: %d\n",
33      flatten($filename), @is_file($filename));
34  clearstatcache();
35}
36?>
37--EXPECT--
38float(-2.34555): 0
39string(1) " ": 0
40string(0) "": 0
41bool(true): 0
42bool(false): 0
43NULL: 0
44int(1234): 0
45int(0): 0
46