1--TEST--
2Test lstat() and stat() functions: usage variations - effect of is_file()
3--SKIPIF--
4<?php
5if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
6?>
7--FILE--
8<?php
9$file_path = __DIR__;
10require "$file_path/file.inc";
11
12/* test the effects of is_file() on stats of a file */
13
14/* create temp file */
15$filename = "$file_path/lstat_stat_variation11.tmp";
16$fp = fopen($filename, "w");  // temp file
17fclose($fp);
18
19// is_file() on a file
20echo "*** Testing stat() on a file after using is_file() on it ***\n";
21$old_stat = stat($filename);
22// clear the stat
23clearstatcache();
24sleep(1);
25var_dump( is_file($filename) );
26$new_stat = stat($filename);
27// compare self stats
28var_dump( compare_self_stat($old_stat) );
29var_dump( compare_self_stat($new_stat) );
30// compare the stat
31var_dump( compare_stats($old_stat, $new_stat, $all_stat_keys) );
32// clear the stat
33clearstatcache();
34
35echo "\n--- Done ---";
36?>
37--CLEAN--
38<?php
39$file_path = __DIR__;
40unlink("$file_path/lstat_stat_variation11.tmp");
41?>
42--EXPECT--
43*** Testing stat() on a file after using is_file() on it ***
44bool(true)
45bool(true)
46bool(true)
47bool(true)
48
49--- Done ---
50