1--TEST--
2Test is_file() function: usage variations - links
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') {
6    die('skip Do not run on Windows');
7}
8?>
9--FILE--
10<?php
11/* Creating soft and hard links to a file and applying is_file() on links */
12
13$file_path = __DIR__;
14fclose( fopen($file_path."/is_file_variation2.tmp", "w") );
15
16echo "*** Testing is_file() with links ***\n";
17/* With symlink */
18symlink($file_path."/is_file_variation2.tmp", $file_path."/is_file_variation2_symlink.tmp");
19var_dump( is_file($file_path."/is_file_variation2_symlink.tmp") ); //expected true
20clearstatcache();
21
22/* With hardlink */
23link($file_path."/is_file_variation2.tmp", $file_path."/is_file_variation2_link.tmp");
24var_dump( is_file($file_path."/is_file_variation2_link.tmp") );  // expected: true
25clearstatcache();
26
27echo "\n*** Done ***";
28?>
29--CLEAN--
30<?php
31$file_path = __DIR__;
32unlink($file_path."/is_file_variation2_symlink.tmp");
33unlink($file_path."/is_file_variation2_link.tmp");
34unlink($file_path."/is_file_variation2.tmp");
35?>
36--EXPECT--
37*** Testing is_file() with links ***
38bool(true)
39bool(true)
40
41*** Done ***
42