1--TEST--
2Test rename() function: usage variations-6
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) != 'WIN') die('skip..  for Windows');
6include_once __DIR__ . '/windows_links/common.inc';
7skipIfSeCreateSymbolicLinkPrivilegeIsDisabled(__FILE__);
8?>
9--FILE--
10<?php
11
12$tmp_file = __FILE__.".tmp";
13$tmp_link = __FILE__.".tmp.link";
14$tmp_link2 = __FILE__.".tmp.link2";
15
16touch($tmp_file);
17symlink($tmp_file, $tmp_link);
18rename($tmp_link, $tmp_link2);
19
20clearstatcache();
21
22var_dump(readlink($tmp_link));
23var_dump(readlink($tmp_link2));
24var_dump(file_exists($tmp_file));
25
26@unlink($tmp_link);
27@unlink($tmp_link2);
28@unlink($tmp_file);
29
30echo "Done\n";
31?>
32--EXPECTF--
33Warning: readlink(): %s in %s on line %d
34bool(false)
35string(%d) "%srename_variation6-win32.php.tmp"
36bool(true)
37Done
38