1--TEST--
2Test rename() function: usage variations-8
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') die('skip..  not for Windows');
6if (!function_exists("symlink")) die("skip symlinks are not supported");
7?>
8--FILE--
9<?php
10
11$tmp_link = __FILE__.".tmp.link";
12$tmp_link2 = __FILE__.".tmp.link2";
13
14symlink(dirname(__FILE__)."/there_is_no_such_file", $tmp_link);
15rename($tmp_link, $tmp_link2);
16
17clearstatcache();
18
19var_dump(readlink($tmp_link));
20var_dump(readlink($tmp_link2));
21
22@unlink($tmp_link);
23@unlink($tmp_link2);
24
25echo "Done\n";
26?>
27--EXPECTF--
28Warning: readlink(): No such file or directory in %s on line %d
29bool(false)
30string(%d) "%sthere_is_no_such_file"
31Done
32