1--TEST--
2Test is_file() function: basic functionality
3--FILE--
4<?php
5echo "*** Testing is_file(): basic functionality ***\n";
6
7/* Checking with current file */
8var_dump( is_file(__FILE__) );
9
10/* Checking with (current) dir */
11var_dump( is_file(__DIR__) );
12
13$file_path = __DIR__;
14$file_name = $file_path."/is_file_basic.tmp";
15/* With non-existing file */
16var_dump( is_file($file_name) );
17/* With existing file */
18fclose( fopen($file_name, "w") );
19var_dump( is_file($file_name) );
20
21echo "*** Testing is_file() for its return value type ***\n";
22var_dump( is_bool( is_file(__FILE__) ) );
23var_dump( is_bool( is_file("/no/such/file") ) );
24
25echo "\n*** Done ***";
26?>
27--CLEAN--
28<?php
29$file_path = __DIR__;
30$file_name = $file_path."/is_file_basic.tmp";
31unlink($file_name);
32?>
33--EXPECT--
34*** Testing is_file(): basic functionality ***
35bool(true)
36bool(false)
37bool(false)
38bool(true)
39*** Testing is_file() for its return value type ***
40bool(true)
41bool(true)
42
43*** Done ***
44