1--TEST--
2Test realpath() with relative paths
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') {
6    die('skip no symlinks on Windows');
7}
8?>
9--FILE--
10<?php
11$file_path = dirname(__FILE__);
12@mkdir("$file_path/realpath_basic/home/test", 0777, true);
13@symlink("$file_path/realpath_basic/home", "$file_path/realpath_basic/link1");
14@symlink("$file_path/realpath_basic/link1", "$file_path/realpath_basic/link2");
15echo "1. " . realpath("$file_path/realpath_basic/link2") . "\n";
16echo "2. " . realpath("$file_path/realpath_basic/link2/test") . "\n";
17?>
18--CLEAN--
19<?php
20$file_path = dirname(__FILE__);
21unlink("$file_path/realpath_basic/link2");
22unlink("$file_path/realpath_basic/link1");
23rmdir("$file_path/realpath_basic/home/test");
24rmdir("$file_path/realpath_basic/home");
25rmdir("$file_path/realpath_basic");
26?>
27--EXPECTF--
281. %s%erealpath_basic%ehome
292. %s%erealpath_basic%ehome%etest
30