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--FILE--
9<?php
10/* Creating soft and hard links to a file and applying is_file() on links */
11
12$file_path = __DIR__;
13fclose( fopen($file_path."/is_file_variation2.tmp", "w") );
14
15echo "*** Testing is_file() with links ***\n";
16/* With symlink */
17symlink($file_path."/is_file_variation2.tmp", $file_path."/is_file_variation2_symlink.tmp");
18var_dump( is_file($file_path."/is_file_variation2_symlink.tmp") ); //expected true
19clearstatcache();
20
21/* With hardlink */
22link($file_path."/is_file_variation2.tmp", $file_path."/is_file_variation2_link.tmp");
23var_dump( is_file($file_path."/is_file_variation2_link.tmp") );  // expected: true
24clearstatcache();
25
26echo "\n*** Done ***";
27?>
28--CLEAN--
29<?php
30$file_path = __DIR__;
31unlink($file_path."/is_file_variation2_symlink.tmp");
32unlink($file_path."/is_file_variation2_link.tmp");
33unlink($file_path."/is_file_variation2.tmp");
34?>
35--EXPECT--
36*** Testing is_file() with links ***
37bool(true)
38bool(true)
39
40*** Done ***
41